So the carousel works fine when it looks like this:
<div class="banners cycle-slideshow" id="carousel" data-cycle-fx="fadeout" data-cycle-slides="> img" data-cycle-timeout="5000" data-cycle-swipe="true">
<img src=""/>
<img src=""/>
<img src=""/>
<img src=""/>
</div>
However I want links on each of these images but when I put an <a href=""></a>
around each of my images, and then change the data-cycle-slides
from
data-cycle-slides="> img"
To any of these
data-cycle-slides="> a"
data-cycle-slides="a"
It doesn't work.
Instead the carousel will show the first image, then when the next one comes it's just blank until the first image comes around again.
Does any one have any experience with Cycle 2 Carousel by malsup that can help me out?
The approach I took was to utilize the custom caption feature. I have no idea if this is the "correct" approach, but it worked for me, and maybe for you too.
So this specifies a caption that is simply a link, and is located in a
<div>
tag that has the css id of#adv-custom-caption
. That id is styled like this:Conveniently, the
.cycle-slideshow
class is already styled to beposition: relative;
, which makes defining absolute positioning on#adv-custom-caption
to be no problem.Now just put the URLs you want to link to for each image in the
data-url
attribute in each the image tags, and you should be all set.