jQuery document on click tap touchstart not working only (iphone5, iphone6)

时间:2016-04-21 22:26:39

标签: jquery

simple jQuery on click event not working iphone6: $(document).on('click tap touchstart', 'div', function(e){}); not working, what should I do?

1 个答案:

答案 0 :(得分:0)

It seems reasonable to ensure there's a div on your page, and that it has a size large enough for you to click or tap, and that you've referenced jquery properly.

If you do, make sure it has some content or you specify a size for it, adding a background will help visualize the size of the object if you're unsure of the size of the div.

If you include your code, or make a jsfiddle which reproduces the problem this can help narrow down the issue.