title: window.width() jQuery is not working
body: <p>I want to fire this jquery function if screen size is less than 768, but it is not working.
  This is my function and please any one help me to make it work.</p>
  
  <pre><code>$(document).ready(function(){
      var width = $(widow).width(); 
      alert(width);
      if((width &lt;= 768  ){
          $('body').addClass('js');
          var $menu = $('#menu'),
          $menulink = $('.menu-link'),
          $menuTrigger = $('.has-submenu &gt; a');
  
  
          $menulink.click(function(e) {
              e.preventDefault();
              $menulink.toggleClass('active');
              $menu.toggleClass('active');
          });
  
          $menuTrigger.click(function(e) {
              e.preventDefault();
              var $this = $(this);
              $this.toggleClass('active').next('ul').toggleClass('active');
          });
      }
  });
  </code></pre>