title: Change variable value on window width change jQuery
body: <p>I am fairly new to <strong>jQuery/javascript</strong> and I have a quick question, probably very simple but I can't seem to figure it out.</p>
  
  <p>I want to change a variable value when the window width has changed. The reason I'm doing it with jQuery is that I can't alter the width or height via css.</p>
  
  <p><strong>This is my code:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      var jwheight = 390,
      windowSize = $(window).width();
  
      $(window).resize(function(){
          if (windowSize &lt; 992) {
              jwheight = 39;
          }
      })
  
  player.initialize(800, jwheight, "player", "http://www.website.com", "http://www.website.com/static/images/logo.png", true);
  
  &lt;/script&gt;
  </code></pre>
  
  <p>So I want to change the height <strong>(jwheight)</strong> when the window width is smaller than 992px.</p>
  
  <p>All help would be appreciated, thank you.</p>