Open christopherpaulhilton opened 12 years ago
The slides.js script searches the entire page for elements with given class names for the next/prev buttons, pagination, etc... you can update the script and replace all such instances with a jQuery find instead. For example when slides.js tries to find the "next" button:
It does: $('.' + option.next) It should be doing: $(this).find('.' + option.next)
If you get the un-minified version of the script this should only take you 5-10 minutes.
Idea:
3.Use the jQuery attributeContainsPrefix selector to automatically select all Slides instances no matter how few or how many there are.
$('div[id|="slides"]').slides({ next: 'next', prev: 'prev' });
It has worked for me quite well, but I'm sure there is a cleaner way to use the CSS classes across multiple containers.
Cheers! Chris