Hello, how do I get the total amount of slides within cycle pagerAnchorBuilder function ??
To generate a navigation within jQuery cycle I use the function pagerAnchorBuilder. This works fine. Now I want to separate the navigation anchors with a vertical line in between. I do this with a css border-right on nav.a The last anchor should have no right border! So I want to give this specific last anchor a class noborder. I get the total amount of slides within cycle pagerAnchorBuilder function ?? var index=0; var imgTitles = new Array(###ARRAY_TITLE###); var imgCredits = new Array(###ARRAY_DESCRIPTION###); var imgLinks = new Array(###ARRAY_LINK###); var idx=0; function goto(id) { index = id; document.getElementById('img_title').innerHTML = imgTitles[index]; document.getElementById('img_credits').innerHTML = imgCredits[index]; document.getElementById("img_link").href = imgLinks[index]; } function onBefore(curr, next, opts) { setTimeout(function() { id = opts.currSlide; goto(id); }, 10); } $(function() { $('#slideimage') .before('<div id="nav">') .cycle({ fx: 'fade', speed: 2000, timeout: 10000, pager: '#nav', // callback fn that creates a thumbnail to use as pager anchor pagerAnchorBuilder: function(idx, slide) { var counter = idx+1; // Here I need the total amount of slides var totalslide = ???; if(counter < totalslide) { return ' ' + counter + ' '; } else { return ' ' + counter + ' '; } }, before: onBefore }); }); -- View this message in context: http://old.nabble.com/jQuery-pagerAnchorBuilder-countSlide-tp27274130s27240p27274130.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.