jquery on绑定事件叠加解决方法
jquery on绑定事件叠加解决方法
代码如下
<pre>
$('.maoqiu').each(function () {
var is_bind = $(this).attr('is_bind');
if (is_bind != 1) {
$(this).attr('is_bind', 1);
$(this).on('touchend', function () {
var that = $(this);
that.addClass('fadeOutRight animated');
mcount++;
setTimeout(function () {
that.remove();
$('.p3_wz2').text(mcount);
}, 500)
})
}
});
</pre>
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/