View Single Post
Old 12-17-2012, 10:54 AM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,705
Thanks: 5
Thanked 876 Times in 851 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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()
});
__________________
Don’t click this link!

Last edited by VIPStephan; 12-17-2012 at 10:57 AM..
VIPStephan is offline   Reply With Quote
Users who have thanked VIPStephan for this post:
tabbu (12-17-2012)