jQuery 'document', 'body' and 'html' selectors not working on iPhone
I need to run a function when you click anywhere on the page.开发者_C百科 Initially I used this:
$('html').click(function() {
// stuff to happen
});
This works perfectly in my android phone and in firefox, but doesnt work on iPhones. Ive tried changing 'html' to 'body' and 'document' but still no luck.
Is there a proper iPhone way to use anything as a selector? I guess I could use '*' but I dont want the overhead as this is a mobile optimised site. Thanks
Have you tried $('body').click(function() { …
?
精彩评论