loop my function but not able to do it properly
<p>i have a code which i want to run in loop but its only running one time i tried intervel but its not working</p>

<p>here is the code :</p>

<pre><code>var getposition = 0;
var intervalinfo ;


         function setpostion(){
             document.getElementById("join").style.position = "absolute";
             document.getElementById("join").style.left = "0px";
             document.getElementById("join").style.top = "100px"

            intervalinfo = setInterval(getanimation ,50);
             }

             function getanimation() {
                 getposition += 5;
                document.getElementById("join").style.left = getposition + "px"; 

                 if (getposition &gt; 500) {
                    // clearInterval(intervalinfo);
                     document.getElementById("join").style.left = "0px";

                     }

                 }

    window.onload = function() {
        setTimeout(setpostion , 2000);

        }
</code></pre>

<p>Any help is really appreciable in advance :-)</p>
