JQuery - how do I exit user defined function?
<p>I have a function that runs on document load:</p>

<pre><code>    function animateText() {
        $('.block')
        .css("background-image", "url(images/text-4-line-1.png)")
        .animate({left: "526"}, 1, "linear" ) .delay(2200).fadeIn(1000)
        .delay( 3000)
        .fadeOut(1000)
        $('.block2')
        .css("background-image", "url(images/text-4-line-2.png)")   
            .animate({left: "484"}, 1).delay(3200).fadeIn(1000)
         .delay( 2500)
          //etc...
    }
</code></pre>

<p>I want to have a button that will stop this function from running and return all elements to original positions. I also want to have another button that will replay the animation function.</p>

<p>I can't get this to work. </p>

<p>Any help would be great!!</p>

<p>Thanks!</p>
