title: Is is possible to change an already setTimeout in different window width?
body: <p>I have a dropdown menu , which in dekstop version I would like to have delay of 1.5s , but when the width is already changed for tablet or iphone (for example less than 768px) I would like to change the settimeout to ZERO/0 ? Is it possible to be done at all ? Actually i am adding a class to the menu , so it could show up , but when it is closing i have set a settimeout of 1.55s. But it is a little bit annoying to wait so much if you are using a phone or tablet....</p>
  
  <pre><code>$menuHolder.on('click', function() {
    if ($menu.hasClass('open') || $navMenu.hasClass('visible')) {
      setTimeout(function() {
        $menu.removeClass('open');
      }, 1550);
      $navMenu.removeClass('visible')
      return;
    }
    $menu.addClass('open');
    $navMenu.addClass('visible');
  })
  
  var windowWidth = $win.width();
  if (windowWidth &lt; 769) {
    $menuHolder.on('click', function() {
      if ($menu.hasClass('open') || $navMenu.hasClass('visible')) {
        setTimeout(function() {
          $menu.removeClass('open');
        }, 0);
        $navMenu.removeClass('visible')
        return;
      }
      $menu.addClass('open');
      $navMenu.addClass('visible');
    })
  }
  </code></pre>