开发者

jCarousel animate the carousel with jQuery

开发者 https://www.devze.com 2023-02-14 06:23 出处:网络
Hi I\'m using jCarousel开发者_JAVA技巧. Is it possible to animate the carousel yourself. So for example I could create a button and attach a jQuery handler to it so that when the button was click it m

Hi I'm using jCarousel开发者_JAVA技巧. Is it possible to animate the carousel yourself. So for example I could create a button and attach a jQuery handler to it so that when the button was click it moved the carousel to a certain index?


var carousel = $('element_you_called_jcarousel_on').data('jcarousel');
carousel.scroll(index); //moves to a specified index (1-n);
carousel.next(); //move forward 1 item
carousel.prev(); //move back 1 item
0

精彩评论

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