Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery animation time speeds up after first run

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29787
    dcp3450
    Participant

    I’m making a basic marquee that takes a set of list items and scrolls them (this is for a sports site, they want a news ticker).

    Everything works except after the first run the duration speeds up.

    Code:
    var duration = 10000;
    var textScroll = function(toScroll, time)
    {
    toScroll.animate({left:”-“+toScroll.children().text().length+”px”},time,”linear”, function()
    {
    $(this).css({left:toScroll.children().text().length});
    textScroll($(this),duration);
    });
    };
    textScroll($(‘.textScroll ul’), duration);

    Like i said, it scrolls perfectly. Just gets faster after the first scroll.

    Any ideas?

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.