jquery: Exiting function
<p>I am doing animation in jquery. I have a looping picture moving from left to right of the webpage. I used following code:</p>

<pre><code> function run() {  $("#run").animate({ left: "980px" }, 250).animate({
  left: "-600px" }, 0);   setTimeout("run()", 250);
 }
</code></pre>

<p>I want to stop the loop(OR break the function) once I press a button.</p>
