javascript - Zepto - Can't cancel link tap on iPad -
i think must missing obvious, can't use preventdefault cancel navigating link's href when link tapped on ipad (it works ok on android phone though).
i have simple test page, has on:
<a id="mn" href="http://www.google.com">some link</a> <script> document.write('<script src=js/' + ('__proto__' in {} ? 'zepto.min' : 'jquery-1.6.2.min') + '.js><\/script>'); if ('__proto__' in {}) { document.write('<script src=js/touch.js><\/script>'); } $(document).ready( function() { $('#mn').tap(function(e) { e.preventdefault(); e.stoppropagation(); }); } ); </script>
the tap event called, if stick alert in there fires ok, action of clicking link never cancelled. missing?!
thanks,
toby
Comments
Post a Comment