Please add the onAfter
javascript function to your code like:
function onAfter(curr, next, opts) {
var index = opts.currSlide;
$('#prev')[index == 0 ? 'hide' : 'show']();
$('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
Frage
Am using malsup cycle slider with after callback option it shows error like this
ReferenceError: onAfter is not defined
after: onAfter,
i called even correctly
$('#slider').cycle({
fx: 'scrollHorz',
pager: '.sli_nav',
next: '#nxt',
prev: '#prev',
after: onAfter,
timeout: 0
});
is there anything i missed.?
Lösung
Please add the onAfter
javascript function to your code like:
function onAfter(curr, next, opts) {
var index = opts.currSlide;
$('#prev')[index == 0 ? 'hide' : 'show']();
$('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}