malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

Adding links #684

Open dbusr opened 9 years ago

dbusr commented 9 years ago

I can't get this to work with links. In the below code, if I remove slides parameter and the link code, the images display and cycle as expected. But when I add that parameter back in, the images won't even display, whether I have the link code or not. Can someone please point out my mistake?

<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.cycle2.js"></script> 
<div class="cycle-slideshow" data-cycle-fx=fadeout
                              data-cycle-timeout=2000
                              data-cycle-pause-on-hover="true" 
                              data-cycle-slides=">a"
                              STYLE="position:absolute; left:910px; top:85px; z-index: 5"
    >
     <a href="#"><img src="images/img1.png"></a> 
     <a href="#"><img src="images/img2.png"></a>  
</div>
landitus commented 9 years ago

Have you tried with the parameter "data-slides"? In JS I used "slides" to point to the DOM element that acts as a slide.