Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The third step is to actually create the Lighbox by calling the initialization script. This initialization function has the form

Code Block
typejavascript

createLightboxFromId: function (containerId, options);

The Lightbox initialization function allows you to pass in a number of optional parameters to configure some aspects of the Lightbox, including a 'callback' function. The callback communicates changes in the ordering of images back to the server. In its "out-of-the-box" form, the Lightbox includes a mechanism for sending any changes in the ordering of images back to the server via a callback function. This default callback function that uses a form with hidden <input> elements in the markup to record the indexes of the elements.The Lightbox initialization function allows you to pass in a number of optional parameters to configure some aspects of the Lightbox, including the callback function. For our example, we will disable the default callback by specifying an empty function:

...