开发者

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');

                });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜