Interchange Javascript Reference



Foundation provides JavaScript components for Interchange as listed below.

Initializing

You can initialize the interchange in the JavaScript by using the foundation.interchange.js and foundation.core.js plugins. The plugin requires the following libraries −

  • foundation.util.mediaQuery.js

  • foundation.util.timerAndImageLoader.js

Foundation.Interchange

It specifies instance of an Interchange as defined below −

var elem = new Foundation.Interchange(element);

Sr.No. Name & Description Type
1

element

It creates a jQuery object into a Interchange.

jQuery
2

options

Default plugin setting is override.

Object

Plugin Options

You can use the following plugin to customize the Interchange instance. You can set the plugin option as individual data attributes.

Sr.No. Name & Description
1

rules

data-interchange array notation is set. It is applied to interchange elements.

Functions

The following are the functions used in interchange.

.replace

Replaces the image or HTML src property to the specified path.

Sr.No. Name & Description Type
1

path

Sets Image or HTML path.

string

.destroy

The instance of interchange is destroyed.

foundation_plugins.htm
Advertisements