jQuery window width in math calculations issue
<p>Hi i have a simple calculation which theoretically should work... But it doesn't, namely I have this:</p>

<pre><code>    var win_width = $(window).width();
    var qc_widht  = 100;
    var container = 900;
    var a = win_width - container;
    var b = win_width - a - qc_widht;

    console.log(a + ' ' + b + ' ' +win_width);
</code></pre>

<p>And i use it in window.on('resize') function.</p>

<p>When i check the log both a and win_width change but b stays the same (never changes. My question is why b never changes?</p>

<p>Great thanks in advance for any help or advice.</p>

<p>Raf</p>