Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
building jquery horizontal scroller
Old 05-20-2009, 10:58 AM building jquery horizontal scroller
Skilled Talker

Posts: 83
Trades: 0
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
killerwhale65 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-20-2009, 01:00 PM Re: building jquery horizontal scroller
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Set a width on #scroller
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 05-20-2009, 01:19 PM Re: building jquery horizontal scroller
Skilled Talker

Posts: 83
Trades: 0
ok that works, thanks.
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to building jquery horizontal scroller
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18957 seconds with 12 queries