title: Using JQuery to Resize a Div to Match Window Dimensions
body: <p>Here is the code that DOES NOT work:</p>
  
  <p>(The behavior is that the div doesn't change size. Note that I am also using JScrollPane on this div. [I mean the javascript library and <strong>not</strong> the Swing component]).</p>
  
  <pre><code>function resizeDivs()
  {
      alert( "BEFORE\n#page width, height: " + $('#page').css( "width" ) + "," + $('#page').css( "height" ) );
      alert( "window width, height: " + $(window).width() + "," + $(window).height() );
  
      $('#page').css( "width", $(window).width() );
      $('#page').css( "height", $(window).height() );
  
      alert( "AFTER\n#page width, height: " + $('#page').css( "width" ) + "," + $('#page').css( "height" ) ); 
  }
  </code></pre>