title: apply jQuery on specific resolution
body: <p>I am using jQuery for mobile Hamburger menu:</p>
  
  <p><code>jQuery( function($) { 'use strict;</p>
  
  <pre><code>$( '&lt;div id="header-mobile-menu"&gt;&amp;#x2261; &lt;div class="mH"&gt;&lt;/div&gt;&lt;/div&gt;' ).insertBefore( 'nav.nav-header ul.genesis-nav-menu' );
  
  $( 'nav.nav-header ul.genesis-nav-menu' ).addClass( 'hide' );
  
  $('#header-mobile-menu').on( 'click', function() {
      $('nav.nav-header ul.genesis-nav-menu').slideToggle();
      $(this).toggleClass('active');
  });
  </code></pre>
  
  <p>});
  </code>
  The problem is that the menu doesn't close itself after been clicked. So I have added this: </p>
  
  <pre><code>    $('.menu-item').on( 'click', function() {
      $('nav.nav-header ul.genesis-nav-menu').slideToggle();
      $('#header-mobile-menu').toggleClass('hide');
  </code></pre>
  
  <p>But now its being aplied to all resolutions. And it is not good. So I tried to change it with this:</p>
  
  <pre><code>if($(window).width() &lt; 992 ){}
  </code></pre>
  
  <p>And the final look would be: </p>
  
  <p><code>
  jQuery( function($) { 'use strict';</p>
  
  <pre><code>// Insert mobile menu before the Genesis Header Right widget navigation menu
  $( '&lt;div id="header-mobile-menu"&gt;&amp;#x2261; &lt;div class="mH"&gt;&lt;/div&gt;&lt;/div&gt;' ).insertBefore( 'nav.nav-header ul.genesis-nav-menu' );
  
  // Add .hide class to .nav-header .genesis-nav-menu to hide it for small screen sizes
  $( 'nav.nav-header ul.genesis-nav-menu' ).addClass( 'hide' );
  
  // Toggle Header Right widget navigation menu for mobile menu
  $('#header-mobile-menu').on( 'click', function() {
      $('nav.nav-header ul.genesis-nav-menu').slideToggle();
      $(this).toggleClass('active');
  });
  
      if($(window).width() &lt; 992 ){
  // Hide Header Right widget navigation menu for mobile menu if clicked
      $('.menu-item').on( 'click', function() {
      $('nav.nav-header ul.genesis-nav-menu').slideToggle();
      $('#header-mobile-menu').toggleClass('hide');
  })};
  </code></pre>
  
  <p>});
  </code></p>
  
  <p>And its not working... Please help who knows jQuery syntax.</p>