0

Here's a link that shows how to make a non-clickable element such as a div "clickable" in iOS safari: how to set cursor style to pointer for links without hrefs

Very helpful, however I have some pop-up messages that can be cleared via a little close button or closed when a user clicks anywhere outside the message window. It works great on desktop, but I'm wondering if there is any way to get iOS to detect a click on the body--that is, anywhere that isn't the message. I toyed with something like

body{
    clickable: pointer;
}

But that (predictably) turns the desktop pointer into the hand everywhere and doesn't seem to work in iOS anyway.

Community
  • 1
  • 1
crowhill
  • 2,398
  • 3
  • 26
  • 55
  • Did you ever find a solution for this? – Peter Warbo Sep 16 '15 at 20:14
  • I think I used fastclick.js, which, among other things, makes mobile browsers respect click events. I'll add that this was for a project that just need to 'work,' I've no idea if fastclick.js is a good solution for anything serious. – crowhill Sep 16 '15 at 23:30

0 Answers0