jquery - how to add active class on centre li -
i make 1 “coverflow effect” based on div. decided use bxslider , working fine not getting centre "zoom effect" like... can see example of want here.http://www.cssjquery.com/coverflow.php
i'm not sure how effect on bxslider. possible if add class on each center li ? meaning, whichever "li" moving center, can add 1 class "active"... can make active transform:sceal etc.
do have ideas on how can make happen? or other coverflow script can recommend this....
thanks.
demo
http://jsfiddle.net/cyber007/cbzmopzb/
using inbuilt api, onslidebefore, onsliderload in bxslider, animation can achived..
jquery(function($){ var slider = $('.bxslider').bxslider({ minslides: 1, moveslides:1, maxslides: 3, pager:false, controls:false, slidewidth: 360, slidemargin: 0, onslidebefore : function($slideelement, oldindex, newindex){ // code here $(".bxslider li").removeclass("active-slide") $slideelement.next().addclass("active-slide") }, onsliderload:function(index){ $(".bxslider li").eq(1+$(".bxslider .bx-clone").length/2).addclass("active-slide") } });
Comments
Post a Comment