开发者

Auto Rotate Image Gallery with jQuery

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜