Javascript minimize and maximize
<p>I want to scale the div onclick to 25% and back onclick to 50%.
Why isn't it scaling back to 50%?</p>

<pre><code>var minimize = document.getElementById('minimize');
var container = document.getElementById('container');

minimize.onclick = function(){

    if(container.style.width = "50%") {
        container.style.width = "25%";
        container.style.height = "25%";
    }else{
        container.style.width = "50%";
        container.style.height = "50%";
    }

    console.log(container.style.width);
}
</code></pre>

<p>}</p>
