Javascript Marquee to replace <marquee> tags

I'm hopeless at Javascript. This is what I have:

<script type="text/javascript">
    function beginrefresh(){

        //set the id of the target object
        var marquee = document.getElementById("marquee_text");

        if(marquee.scrollLeft >= marquee.scrollWidth - parseInt( {
            marquee.scrollLeft = 0;

        marquee.scrollLeft += 1;

        // set the delay (ms), bigger delay, slower movement
        setTimeout("beginrefresh()", 10);


It scrolls to the left but I need it to repeat relatively seamlessly. At the moment it just jumps back to the beginning. It might not be possible the way I've done it, if not, anyone have a better method?


Here is a jQuery plugin with a lot of features:

And this one is "silky smooth"

Need Your Help

Convert ascii codes(integers) to characters


I am trying to convert a list of integers to characters (integers are separated by white spaces, newlines and tabs). The input ends with EOF. For example,

JPA Multiple Transaction Managers

java spring orm jpa transactions

I have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware ...