开发者

Auto Rotate Image Gallery with jQuery

开发者 https://www.devze.com 2023-02-16 06:03 出处:网络
hope you all \'v been doing great could anyone please help me with this I am trying to rotate the image gallery automatically - currently its triggered by the links...

hope you all 'v been doing great

could anyone please help me with this

I am trying to rotate the image gallery automatically - currently its triggered by the links...

$('a.nextpic').click(funct开发者_Go百科ion () {              
$('#slides').scrollTo($(this).attr('href'), 800);           
return false;
});

what I am trying is

function rotategal(param){
$('#slides').scrollTo(param.next().attr('href'), 500);
setTimeout(function() { rotategal(param); }, 500);
}
rotategal($('a.nextpic'));

but this runs it just once... I sure am missing some key here... any help?


This isn't a direct answer to your coding question but I've used a jQuery plugin called jCarousel with great success. The feature your looking for and many more are already available in jCarousel:

http://sorgalla.com/projects/jcarousel/

0

精彩评论

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

关注公众号