jquery stop animation when completed
<p>I've looked around and can't find my problem solved. Here it is...
When my page loads I have a div animate into the page horizontally from the left. The div animates from a negative to 0. Cool, exactly what I want it to do.</p>

<p>The problem is, I don't want the div to animate when a new link is clicked and loads another page. I figured I'ld create an if statement that says, when div equals 0 stop animation or keep it's original value of 0. Having the animate() in the beginning of the code plays out every time the page reloads when a link is clicked. How do I go about fixing this?</p>

<pre><code>// Set new postion of sideBarNavigation to animate into container screen
var newSbnXPosition = $(".slideContainer").css({"top": "0em" , "left": "-14.3125em"});
//alert(newSbnXPosition.position().left);

(newSbnXPosition).animate({left: "0"}, "slow", function() {
    console.log("imagesContainer = " + $(".imagesContainer").position().left);
    if (newSbnXPosition.position().left === 0) {
            console.log("statment is true remove animation");
            //$(".slideContainer").css({"top": "0em" , "left": "0em"});
            //newSbnXPosition.position().left = 0;

    }
});
</code></pre>
