Hello,
I am currently building a jquery horizontal scroller.
The idea is to have news items in DIVs, that are displayed next to each other. The whole thing should then continuously scroll from right to left.
The problem i have here, is that the second div first appears under the first div, and then jumps next to the first div. The jump happens as soon as the scroll has gone far enough to the left for the second div to be able to fit next to the first div.
Here is the code:
Code:
<script type="text/javascript">
$(document).ready(function(){
//$('#scroller').css({"margin-left":"100px"});
$('#scroller').animate({marginLeft: "-100px"}, 10000, "linear");
});
</script>
<div style="width:850px;height:50px;overflow:hidden; border:1px solid #000000;text-align:left;">
<div id="scroller" style="margin-left:1000px;">
<div style="width:150px;float:left;"><b>maandag 25 maart:</b><br>heerlijke activiteitennaam op activiteitplaats</div>
<div style="width:150px;float:left;"><b>maandag 25 maart:</b><br>heerlijke activiteitennaam op activiteitplaats</div>
</div>
</div>
Any idea's?
Thanks
Matt
|