Creating a slideshow jQuery plugin, but having trouble getting it to work with more than one slideshow on a single page.. The top slider functions perfectly, but the second doesn’t function at all. Tried searching everywhere, cannot find any information on this. Appreciate any insight and help:
Creating a slideshow jQuery plugin, but having trouble getting it to work with more
Share
EDIT: I misread the original question, and so deleted my original answer. Below is hopefully an answer that can help the question.
The following link http://jqfundamentals.com/book/ch08s05.html is an article on how to build a stateful jQuery plugin. It uses the jQuery.widget plugin system, which is part of jQuery UI, but can be used without the UI component. One of the main benefits that you get from this plugin system is that context passed in is always an object, versus a DOM element, and if the user calls the plugin on a collection of elements, a new instance is created for each element in that collection, vs passing the collection into the plugin itself.
I personally don’t have much experience writing jQuery plugins (or using the jQuery.widget plugin system), but it looks like this new plugin system was built specifically to assist in building stateful plugins that work correctly across multiple elements.