title: Eliminate 300ms delay on click events in mobile Safari
body: <p>I've read that <a href="https://developers.google.com/mobile/articles/fast_buttons?hl=de-DE."> mobile Safari has a 300ms delay on click events</a> from the time the link/button is clicked to the time the event fires. The reason for the delay is to wait to see if the user intends to double-click, but from a UX perspective waiting 300ms is often undesirable.</p>
  
  <p><a href="http://www.mikedellanoce.com/2012/09/10-tips-for-getting-that-native-ios.html">One solution</a> to eliminate this 300ms delay is to use jQuery Mobile "tap" handling. Unfortunately I'm not familiar with this framework and don't want to load some big framework if all I need is a line or two of code applying <code>touchend</code> in the right way.</p>
  
  <p>Like many sites, my site has many click events like this: </p>
  
  <pre><code>$("button.submitBtn").on('click', function (e) {   
    $.ajaxSubmit({... //ajax form submisssion
  });
  
  $("a.ajax").on('click', function (e) {   
    $.ajax({... //ajax page loading
  });
  
  $("button.modal").on('click', function (e) {   
        //show/hide modal dialog
  });
  </code></pre>
  
  <p>and what I'd like to do is to get rid of the 300ms delay on <strong>ALL</strong> those click events using a single code snippet like this:</p>
  
  <pre><code>$("a, button").on('tap', function (e) {
   $(this).trigger('click');
   e.preventDefault();
  });
  </code></pre>
  
  <p>Is that a bad/good idea? </p>