title: Executing $(window).load() and $(window).resize() in Drupal 7
body: <p>I'm trying to resize a couple divs on page load and window resize in drupal 7.</p>
  
  <p>theme.info</p>
  
  <pre><code>name = Theme
  description = The Theme
  core = 7.x
  
  stylesheets[all][] = css/style.css
  scripts[] = js/scripts.js
  
  (the rest)
  </code></pre>
  
  <p>scripts.js</p>
  
  <pre><code>$(window).load(function() {
      getViewport();
  
  });
  
  $(window).resize(function() {
      getViewport();
  });
  
  function getViewport() {    
      alert('function hit');
      var viewportwidth;
      var viewportheight;
      if (typeof window.innerWidth != 'undefined')
      {
           viewportwidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 
           viewportheight = window.innerHeight || document.documentElement.clientHeight || document.body.clientWidth;
      }
      document.getElementById("content").style.height = (window.innerHeight - 150) + 'px';
      document.getElementById('sidebar-first').style.height = (window.innerHeight - 50) + 'px';
  }
  </code></pre>
  
  <p>But neither load, resize, or the function or getting hit.  I'm sure it's my ignorance of utilizing this in drupal, but I can't seem to find the answer.</p>
  
  <p>I've even tried including my own jquery library in the info file, but to no avail.</p>
  
  <p>Thanks</p>