title: IE8 JS error: Object doesn't support this property or method
body: <p>I'm using the following JS I found online to implement a responsive navigation. There is nothing on the source about having any errors in IE8, however I'm doing some compatibility testing in BrowserStack (Win7+IE8) and getting the "Object doesn't support this property or method" error. Here is the entire script:</p>
  
  <pre><code>&lt;script&gt;
  $(function() {  
      var pull        = $('#menu');  
          menu        = $('nav ul');  
          menuHeight  = menu.height();  
  
      $(pull).on('click', function(e) {  
          e.preventDefault();  
          menu.slideToggle();  
      });  
  });  
  
  $(window).resize(function(){  
      var w = $(window).width();  
      if(w &gt; 320 &amp;&amp; menu.is(':hidden')) {  
          menu.removeAttr('style');  
      }  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>And this is the line that IE8 doesn't like (character 6 specifically):</p>
  
  <pre><code>if(w &gt; 320 &amp;&amp; menu.is(':hidden')) { 
  </code></pre>
  
  <p>Any help in solving this would be awesome, I'm still not the best at JS.</p>