frankyonnetti
6/12/2015 - 6:19 PM

#jquery cycle settings

jQuery - cycle settings #jquery

// jquery.malsup.com/cycle/pager11.html

$('#slideshow').cycle({
  fx:      'scrollHorz',
  timeout:  0,
  prev:    '#prev',
  next:    '#next',
  pager:   '#nav',
  pagerAnchorBuilder: pagerFactory
});

function pagerFactory(idx, slide) {
  var s = idx > 2 ? ' style="display:none"' : '';
  return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>';
};