Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

window.click does not fire on Safari for iPad

This code works fine in desktop browsers:

$(window).click(function() {...});

But in Safari on the iPad, it simply doesn't fire. Is this not supported? What is the correct way to be notified when someone touches somewhere in the browser window?

like image 217
Joshua Frank Avatar asked Jan 16 '23 01:01

Joshua Frank


1 Answers

JQuery UI supports touch for devices. . You could bind click and touch listeners on the same set of events.

$(window).bind("click touchstart", function(){...});
like image 166
karthikr Avatar answered Jan 25 '23 01:01

karthikr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!