Eliminating the 300ms in jquery mobile

Eliminating the 300ms in jquery mobile

i'm trying to elminate the 300ms delay in the app, but finding it hard to do

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <script type="text/javascript" src="jquery/jquery.js"></script>
  6. <link rel="stylesheet" type="text/css" href="jquery/jquery.mobile.icons.min.css"/>
  7. <link rel="stylesheet" type="text/css" href="jquery/newly.css"/>
  8. <link rel="stylesheet" type="text/css" href="jquery/jquery.mobile-1.4.5.min.css"/>
  9. <script type="text/javascript" src="jquery/jquery.mobile-1.4.5.js"></script>
  10. <script language="javascript">
  11. $.event.special.tap = {
  12.   setup: function() {
  13.     var self = this,
  14.       $self = $(self);
  15.     $self.on('touchstart', function(startEvent) {
  16.       var target = startEvent.target;
  17.       $self.one('touchend', function(endEvent) {
  18.         if (target == endEvent.target) {
  19.           $.event.simulate('tap', self, endEvent);
  20.         }
  21.       });
  22.     });
  23.   }
  24. };
  25. $('#no-tap-delay').on('tap', function() {
  26.   var $self = $(this);
  27.  
  28. });
  29. </script>
  30. <style>
  31. .html5logo {
  32.   display: block;
  33.   width: 128px;
  34.   height: 128px;
  35.   background: url(imgs/love.png) no-repeat;
  36.   -webkit-tap-highlight-color: rgba(0,0,0,0);
  37. }
  38. .html5logo:active {
  39.   -webkit-transform: scale3d(0.9, 0.9, 1);
  40. }
  41. .pulse {
  42.   -webkit-animation: pulse 400ms;
  43. }
  44. @-webkit-keyframes pulse {
  45.   0% { -webkit-transform: scale3d(0.9,0,9,1); }
  46.   20% { -webkit-transform: scale3d(1.1,1.1,1); }
  47.   40% { -webkit-transform: scale3d(0.95,0.95,1); }
  48.   70% { -webkit-transform: scale3d(1.05,1.05,1); }
  49.   100% { -webkit-transform: scale3d(1,1,1); }
  50. }
  51. </style>
  52. </head>
  53. <body>
  54. <div data-role="page" id="page">
  55.   <div data-role="header">
  56.     <h1>Header</h1>
  57.   </div>
  58.   <div data-role="content"><a id="no-tap-delay"
  59.   class="html5logo"
  60.   href="#page2"></a>
  61. </div>
  62.   <div data-role="footer">
  63.     <h4>Footer</h4>
  64.   </div>
  65. </div>
  66. <p>&nbsp;
  67.   <div data-role="page" id="page2">
  68.   <div data-role="header">
  69.     <h1>Header</h1>
  70.   </div>
  71.   <div data-role="content"><a href="#page">back to page1</a></div>
  72.   <div data-role="footer">
  73.     <h4>Footer</h4>
  74.   </div>
  75. </div>
  76. </body>
  77. </html>
when i click on the link the 300ms still works out