title: Running javascript if statement is true otherwise do nothing
body: <pre><code>function loadMenus() {
      if(w &lt;= 767){
          $(".history").click(function(){
              $(".historyMenu").slideToggle("fast");
          });
      }
      else (w &gt;= 768) {
          // Do not load 
      }
  }
  </code></pre>
  
  <p>Im trying to run a slide toggle only when the size of the window is less than 767 but do nothing when is greater than that. I only want a specific functionality when the window is small but not when the window is large. Help.</p>