I build a WepApp and I like to remove the 300ms delay on touch-devices with this code from Google
DOC
http://developers.google.com/mobile/articles/fast_buttons
I not sure, I don't see any difference between both version on my HTC one X.
Demo 1 (normal)
http://jsbin.com/awejal/4/edit
Demo 2 (with fastclick fix)
http://jsbin.com/awejal/5/edit
I get (in Demo 2) additional an error in the console TypeError: element is null
but why? I don't get it.
The issue is almost certainly from your typerror. A TypeError like that means you tried to call a method on a null object. You need to find out why you are getting that typerror, and then fix it. Without the proper linking between the DOM and the jQuery the google supplied code won't help.
I think the line that is causing you problems is the
new FastButton(document.getElementById("fastclick"), goSomewhere);
because I didn't see any element with id fastclick
.
Try fixing that and let me know how it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With