Why does this if/else statement always execute the if branch?
<p>Hey guys I know that there exists <code>.slideToggle()</code> but I want to add more features later.</p>

<p>I don't know what I'm doing wrong, sliding up works but I cannot slide down.</p>

<p>Can I not overwrite my var? Would be very nice when somebody can help me.</p>

<pre><code>$(document).ready(function () {

    var resizeValue = true;
    $(".resizeSelect").click(function () {
        if (resizeValue === true) {
            $(".resize").slideUp(

            function () {
                $('.parent').height($('.child').height('100'));
            });
            var resizeValue = false;
        } else {
            $(".resize").slideDown(

            function () {
                $('.parent').height($('.child').height('100'));
            });
            var resizeValue = true
        };
    });
});
</code></pre>
