开发者

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() { … ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜