jQuery cycle question

jQuery cycle question

Hi!

I'm new to jQuery and Javascript, not new to HTML/CSS/PHP though.

I've created a simple slideshow suding jQuery cycle:

<script type='text/javascript'>
$(document).ready(function(){
   $('#slideshow1').cycle({
   fx:'fade',
   speed:'2000',
   timeout: 0,
   next:'#next', prev:'#prev'});
   });
</script>


And:

<div id='slideshow1' class='pics'>
<div><img src='001.jpg' /><p>&nbsp;</p></div>
<div><img src='002.jpg' /><p>&nbsp;</p></div>
<div><img src='003.jpg' /><p>&nbsp;</p></div>
<div><img src='004.jpg' /><p>&nbsp;</p></div>
</div>


Everything works as expected. Now I have an additional div container on the page which contains some text. I would like to hide that text when the current element in the slideshow is not the first element. So if I see the first picture, show the text, if I click next and the picture shown is Nr. 2, hide the text. Then when I see picture Nr. 4 and click next I go back to picture Nr. 1. Now the div-container should be displayed again. How can this be done?

Help is greatly appreciated. Thank you!
    • Topic Participants

    • jan