场景:
在有些手机上面点击事件。
$("body").on("click","ele",function(){
})
有时候不会冒泡到body上面
解决办法;
方法一:
在可点击的元素上面ele上面加样式:
cursor:pointer
表示元素可以点击。即可冒泡到body上面。。
方法二:
可以在整体外面包一层div。
<body>
<div id="container">
</div>
</body>
$("#container").on("click","ele",function(){
})
其他
1.PC上面没发现问题。不过pc上面的可点击一般会加cursor:pointer;