This works in desktop safari, but in the iOS version no alert pops up. Is it possible to bind to the \'html\' element in iOS? I want to close a drop-down menu whenever the user
Use document or body element instead of html
document
body
html
$(document).bind("click", function(){ alert("clicked!") });
You can also try this.
$('html, body').bind("click", function(){ alert("clicked!") });