JQuery Cycle Plugin PagerAnchorBuilder Images Becoming Undefined
I have a slideshow built in flash that I want to mimic in jQuery. The slide show uses the images from the slideshow as the pager numbers. The problem im having is once i apply link
Solution 1:
I used JQuery.find()
to help find the images, and to keep the code modular enough to use with different markup:
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#"><img src="'
+ jQuery(slide).find('img').attr('src')
+ '" width="120" /></a></li>';
}
Solution 2:
Read this may help you!
Solution 3:
With reference to JVerstry's comment (nice one JV btw!), I got the following going just fine which uses the image and <a>
link. Also the pager thumbs also show the main image alt attribute:
return '<li class="slider-thumb"><a href="'+slide.href+'" id="pager-click" title="'+slide.title+'"><img src="'+ $(slide).find('img').attr('src')+'" width="90" height="69" class="fader" /></a><p class="slide-caption">'+ $(slide).find('img').attr('alt')+'</p></li>';
Solution 4:
Seems to be a common problem! Check out cycle with anchors and also cycle's "slideExpr"
Post a Comment for "JQuery Cycle Plugin PagerAnchorBuilder Images Becoming Undefined"