Skip to content

Instantly share code, notes, and snippets.

@hansek
Created October 25, 2012 08:37
Show Gist options
  • Save hansek/3951452 to your computer and use it in GitHub Desktop.
Save hansek/3951452 to your computer and use it in GitHub Desktop.
Basic call of jQuery Cycle for Adapt
// banner slideshow
if ($('#js-banner-wrapper').children().length > 1) {
$('#js-banner-wrapper').cycle({
fx: 'fade',
activePagerClass: 'active',
timeout: 0,
next: '#js-banner-next',
prev: '#js-banner-prev',
width: '100%',
fit: 1,
pager: '#js-banner-pager',
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#"><img src="' + $(slide).data('imgsrc') + '" width="72" height="45" /></a></li>';
}
});
}
else {
$('#js-banner-control').hide();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment