title: apply different styles based on window width, jquery
body: <p>I am trying to check the viewport size, and then apply different styles based on whether the viewport size is between 768px - 992px, using an if and else statement. However, what I've got so far isn't working.</p>
  
  <p>Here is my code...</p>
  
  <pre><code>$(document).ready(function() {
      var windowSize = $(window).width();
      function checkwindowSize() {
          if(windowSize &gt; 768 &amp;&amp; windowSize &lt; 992) {
              $('#show-menu').css('visibility', 'hidden', function() {
                  $('#slide-menu-container').css('visibility', 'visible');
              });
          }
          else {
              $('#show-menu').css('visibility', 'visible', function() {
                  $('#slide-menu-container').css('visibility', 'hidden');
              });
          }
      });
  });
  </code></pre>
  
  <p>Thank you! </p>