Skip to content

Instantly share code, notes, and snippets.

@kosinix
Last active December 19, 2015 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosinix/5981324 to your computer and use it in GitHub Desktop.
Save kosinix/5981324 to your computer and use it in GitHub Desktop.
Hide cycle2 pager when there is only 1 slide. Ignores sentinel slide.
var slides = $('.slideshow .slides').children('.slide').length; //Change css selectors accordingly
if(slides <= 1) {
$('.slideshow .pager').hide();
}
@samliew
Copy link

samliew commented Jun 8, 2015

To ignore sentinel slide:

var slides = $('.slideshow .slide:not(.cycle-sentinel)').length;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment