Well, the code has selectors that are too general. For example, if you have several slideshows, how should it know which
.caption to address if all it say is “address the element with class .caption, anywhere in the document”? Either you copy the function and change the selectors for each specific slideshow or you work with the
each() function, like:
Code:
$('.slides').each(function() {
var el = $(this);
var caption = el.find('.caption');
el.slides({
…
(your slider code here)
…
});
// everytime when $('.caption').animate() occurs it should be replaced with the variable defined above, i. e. caption.animate()
});