Having problems with a simple if/then statement
<p>I'm a designer and not very skilled at coding anything but HTML/CSS. I barely understand Javascript but I can usually Franken-copypasta my way to a successful jQuery script for simple animations and basic functionality. In this case though, I'm getting tripped up somewhere and I have no idea where.</p>

<p>The script is simply intended to toggle the "left" property of the "#left-sidebar" element between 0 and -250px when the "#showNav" button is clicked.</p>

<pre><code>$(document).ready(function(){
var navPos = $('#left-sidebar').position().left;
$('#showNav').click(function(){
    if(navPos = -250){
        $('#left-sidebar').animate({
            left: '0px'
        }, 500);
    } else {
        $('#left-sidebar').animate({
            left: '-250px'
        }, 500);
    }
});
});
</code></pre>

<p>I figured I could write an if/then statement to check if the element was already at -250 or not, and switch to the opposite value accordingly. Currently, clicking the button causes the #left-sidebar to go from -250 to 0, but when I click the button again, it doesn't return to -250 as expected. I imagine this is a pretty simple fix, but I don't even know where to start...</p>
