[jQuery] cycle plugin pagerAnchorBuilder
Dear all, I've worked out that the pagerAnchorBuilder option will probably get me what I'm trying for, but I'm trying to add a wrinkle. I've got a slide show using next/prev, but I also want the user to be able to click on links in s to go to specific images in the slide collection. the image collection looks something like this: and the links list like this: Foo text Bar text Baz text I'd like the user to be able to click on "Foo text" and fade in 1.jpg, "Bar text" to fade in 3.jpg, and on "Baz text" to fade in 5.jpg. Could I add an attribute to the anchors that would feed the necessary index to the pagerAnchorBuilder? currently in the cycle options object : pagerAnchorBuilder: function(idx, slide) { return '#clientList li:eq(' + (idx) + ') a'; } this works fine and it doesn't disrupt the prev/next cycle, but it just cycles 1.jpg, 2.jpg, 3.jpg Any suggestions? Jon
[jQuery] Cycle plugin pagerAnchorBuilder and livequery
I have the following $('#fcycle').livequery( function(){ $(this).cycle({ fx: 'fade', timeout: 0, speed: 'slow' , pager: '#qm0', next: '#next', prev: '#prev', pagerAnchorBuilder: function(idx, slide) { // return sel string for existing anchor return '#qm0 li:eq(' + (idx) + ') a'; }; }); }); which all works except for the pagerAnchorBuilder. How can I call the function so it works via livequery. Thanks
[jQuery] Cycle plugin pagerAnchorBuilder question
Hi, I'm using the cycle plugin (and loving it). I'm using 'pagerAnchorBuilder' to build out the nav dynamically in an Ordered List. One thing I'd like to change is instead of having the 'activeSlide' class set on the anchor element, I'd prefer to have it set on its parent LI element. What would be the most elegant way to achieve this? Your help is appreciated - thanks! (below is the code I'm using)... $(document).ready(function(){ $('#slides').after('').cycle({ cleartype: 1, fx: 'fade', pager: '#navSlides ol', pagerAnchorBuilder: function(idx, slide) { if (idx == 0) { return '' + (idx + 1) + ''; } else { return '' + (idx + 1) + ''; } } }); });