animate function
i want to make a simple jquery slider, i dont know jquery very well, so i decided to ask u guys, here is some inf about slider:
javascript:
setInterval(function() {
$('#scroll').animate({top: -200}, 500);
},1000);
html:
<div id="slider">
<div id="scroll">
<div class="content">1</div>
<div class="content">2</div>
<div class="content">3</div>
<开发者_如何学运维;/div>
</div>
and css:
#slider { height:200px; width:200px; background:#dfdfdf; overflow:hidden; position:relative; }
#scroll { position:absolute; }
.content { height:200px; width:200px; color:#000; }
the only thing it does, just animate from 1st to 2nd div, but i need to animate it endlessly, and not only from 1 to a 2 but also to 3rd one. then from 3 to a 1st and etc.. pls smb help!
Try these (carousels)
http://www.1stwebdesigner.com/freebies/jquery-carousel-plugins-tutorials/
http://bxslider.com/
精彩评论