jQuery点击事件触发两次? [英] jQuery click event firing twice?
本文介绍了jQuery点击事件触发两次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是一个很奇怪的例子,你可以在这里看到代码:
This is a fairly weird case, you can see the code here:
推荐答案
您不应使用标签
元素包装输入
元素,请尝试:
you should not wrap input
elements by using a label
element, try this:
<label for="average-data" class="section-view-time-checkbox">
<span class="custom checkbox checked"></span> Average
</label>
<input type="checkbox" id="average-data" style="display: none;">
这篇关于jQuery点击事件触发两次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文