malsup / cycle2

2nd gen cycling
899 stars 237 forks source link

Seems like Overlay feature has bug when using Images as hyperlinks #804

Open ravalds2016 opened 7 years ago

ravalds2016 commented 7 years ago

I am following information on http://jquery.malsup.com/cycle2/demo/overlay.php for simple overlay. When I use simple markup as shown on your page it displays value of title and description. However I need to make Images work as hyperlinks so I put each of those Img tags within anchor tag and added data-cycle-slides="a" for slides to work as hyperlinks however in doing so text overlay function doesnt work well and it only displays "desc" on every slides. Is this a limitation or bug ? Does your implementation provide functionality of making Images as clickable hyperlinks and also display text overlay at the same time ? See below

image

HTML :

<div class="cycle-slideshow"

data-cycle-fx="fade"

data-cycle-pause-on-hover="true"

 ####data-cycle-speed="500"
   ####data-cycle-timeout="4000"
     ####data-cycle-slides="a"
     ####data-cycle-pager=".example-pager">
    ####<a href="https://www.google.com">begin anchor tag
        ####<img src="http://malsup.github.io/images/p1.jpg"
            ####data-cycle-title="Test"
           ####data-cycle-desc="This is test description" />
   ####</a>## end anchor tag
  ####<a href="https://www.google.com">begin anchor tag
      ####<img src="http://malsup.github.io/images/p2.jpg"
      ####data-cycle-title="Spring"
       ####data-cycle-desc="Sonnenberg Gardens">
 ####</a>## end anchor tag

  ####<div class="cycle-overlay"></div>##

End of container div tag i.e. one with div class="cycle-slideshow"
####<div class="example-pager"></div>