Posted By

cerxx on 08/01/19


jquery iOS-hacks

Versions (?)

Click on iOs and Android

 / Published in: JavaScript


Here is a code that force to fire a click on iOS devices, where there is first a touchstart event

  1. var UA = navigator.userAgent,
  2. iOS = !!(UA.match(/iPad|iPhone|Android/i));
  3. $(this).on("click", function(){
  4. // do somthing
  5. });
  6. if (iOS) {
  7. $(document).on('touchstart', function (e) {
  9. });
  10. }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: maryrosie111 on August 2, 2019

very useful info, thank you for sharing with us! wuxiaworld

Posted By: NilsTimonen on August 2, 2019

Thanks for the info!

Posted By: minion89 on October 23, 2019

This article is very detailed and meticulous, I have read many articles on this topic, but for this article, you leave me a deep impression and practical application in my life. Thank you for sharing. [url=]mapquest directions[/url]

You need to login to post a comment.