0

I have a slideshow in which Cycle is auto-generating thumbnails using the pagerAnchorBuilder option:

pagerAnchorBuilder: function(idx, slide) {
 return '<li><a href="#"><img src="' + slide.src + '" width="38" height="45" /></a></li>';
},

I want to hide the last thumbnail (the last 2 thumbanails actually). I know I can use something like:

$('li').eq(-1).hide();

Just not sure where to put it so it happens after all the thumbnails are loaded.

Adam
  • 613
  • 7
  • 16

1 Answers1

1

You can do this:

#pager a:last-child{
   display:none;
}

or you can maybe do something like this http://jsfiddle.net/sxcGR/

  pagerAnchorBuilder: function(idx, slide) {
  var cssClass="";

  if (idx==$('.image-slides img').length-1)  // assumes you are cycling img
    cssClass="hidemeclass"; // css .hidemeclass {display:none}

  return '<li class="' + cssClass + '"><a href="#"><img src="' + slide.src + '" width="38" height="45" /></a></li>';
}
lucuma
  • 18,247
  • 4
  • 66
  • 91