Malsup Cycle jQuery plugin - problem with caption

Malsup Cycle jQuery plugin - problem with caption

hi,

first off i'd just like to say what an absolutely superb plug-in this is... so simple to use and with so much customisation... 

i'm having a small problem with getting the captions to display from a slideshow... i've got multiple slideshows on the page which i guess could be causing the problem... i'm not getting any errors, but no caption is being displayed...

here is a section of my html.... can anyone suggest what i might be doing wrong...


  1. <script>
  2. $(document).ready(function() {
  3.     $('#cat_slide1').cycle({
  4. fx: 'scrollHorz',
  5. timeout: 0, 
  6.    next:   '#next1', 
  7.         prev:   '#prev1',
  8. after:  function() {
  9.             $('#caption1').html(this.alt);
  10.         }
  11. });
  12.     $('#cat_slide2').cycle({
  13. fx: 'scrollHorz',
  14. timeout: 0, 
  15.    next:   '#next2', 
  16.         prev:   '#prev2',
  17. after:  function() {
  18.             $('#caption2').html(this.alt);
  19.         }
  20. });

  21. });
  22.  </script>
  23. <div id="cat_slide1" class="cat_slide_content"> 
  24. <div class="slide_item"><img src="db/content/sica.jpg" alt="new 1 brief"></div>
  25. <div class="slide_item"><img src="db/content/bench1.jpg" alt="new 2 brief"></div>
  26. <div class="slide_item"><img src="db/content/table1.jpg" alt="new 3 brief"></div>
  27. </div>
  28. <div class="control_holder">
  29. <div class="slide_controls"><img src="images/but_left.gif" width="31" height="32" style="margin-right:40px;" id="prev1"><img src="images/but_right.gif" width="31" height="32" id="next1"></div>
  30. <div id="caption1" class="caption_text"></div></div>

  31. <div id="cat_slide2" class="cat_slide_content">
  32. <div class="slide_item"><img src="db/content/mozar1.jpg" alt="new 4 brief"></div>
  33. <div class="slide_item"><img src="db/content/sica.jpg" alt="new 1 brief"></div>
  34. <div class="slide_item"><img src="db/content/bench1.jpg" alt="new 2 brief"></div>
  35. <div class="slide_item"><img src="db/content/table1.jpg" alt="new 3 brief"></div>
  36. </div>
  37. <div class="control_holder">
  38. <div class="slide_controls"><img src="images/but_left.gif" width="31" height="32" style="margin-right:40px;" id="prev2"><img src="images/but_right.gif" width="31" height="32" id="next2"></div>
  39. <div id="caption2" class="caption_text"></div></div>

as you can see i have here 2 slideshows, each with their own navigation controls... this works perfectly... for some reason though the caption divs remain empty...

thanks in advance for any help :)

dog