jQuery Lite Content Slider - Adding class to current slide
Is it possible to add a "curr开发者_StackOverflow中文版ent" class to the slide div that is not hidden? I've been poking at this for a while and was wondering if I'm missing something obvious.
http://jsfiddle.net/e7VZS/1/
Here you go
Working demo
I have modified goToSlide
method. Added the callback method to animate
method in which I am adding the current
class on the current slide.
$('.slider-contents-wrap' + ' ' + theClass)
.animate({
left: animateLeft
}, function(){
$element
.children(options.content).removeClass('current')
.filter(':eq('+(theSlide-1)+')')
.addClass('current');
});
精彩评论