Loop won't stop at given value
<p>I was trying to create a sliding panel that will hide itself with a simple js animation.
Here the developing link: <a href="http://carportal.webpronto.it" rel="nofollow">http://carportal.webpronto.it</a>
just click on "hide panel" to see the search tab go left.</p>

<p>The issue is the following:
I tried to give a value for the panel to stop when it reaches the position left: -25%
But the panel continue his fool run versus the infinite.
here the script i used:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var scrollSpeed = 50;
    var step = 1;
    var current = 0;
    var endposition = 25;   
    function closeBAR(){
        current -= step;  
        if (current == endposition){


            stop;

        }



        $('#colleft').css("left",current+"%"); 



    var init = setInterval("closeBAR()", scrollSpeed);

}
&lt;/script&gt;
</code></pre>

<p>What's wrong with my script?</p>
