/ Published in: JavaScript

Here is a code that force to fire a click on iOS devices, where there is first a touchstart event
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var UA = navigator.userAgent, iOS = !!(UA.match(/iPad|iPhone|Android/i)); $(this).on("click", function(){ // do somthing }); if (iOS) { $(document).on('touchstart', function (e) { e.target.click(); }); }
Comments
