brutaldesign/swipebox — pull request #27 by acarbone (2013-07-02 09:38:09+00:00)
Title: Allow plugin's reinitialize

Hello, this update creates a new "refresh" method to allow the refreshing of the plugin's instance.
This could be useful if for some reason the images which the plugin is instantiated on, are changing.
In my case I have a product's view page which contains the product's images separated by color.
If the user changes color the previous shown images become hidden and the new color's images become visible.

If for example the instance is this:
var swipeboxInstance = jQuery(".swipebox-image:visible").swipebox({
useCSS: true,
hideBarsDelay: 0
});

Using the next call the developer can refresh the plugin so the new color images are considered by the plugin:
swipeboxInstance.refresh();

Bye