So here is my cycle declaration:
function onAfter(curr, next, opts) {
var index = opts.currSlide;
$('.prev')[index == 0 ? 'hide' : 'show']();
$('.next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
$(function() {
$('#slideshow').cycle({
pager: '#nav',
prev: '.prev',
next: '.next',
after: onAfter,
}).cycle('pause');
});
and i want add active class function on after: option. I want to keep both functions in after:
this is the active class function:
$('#slideshow').cycle({
after: function(el, next_el) {
$(next_el).addClass('active');
},
before: function(el) {
$(el).removeClass('active');
}
});
thanks for the help!