jquery on绑定事件叠加解决方法

来源:互联网 发布:mac版u盘制作工具 编辑:程序博客网 时间:2024/06/05 01:16
jquery on绑定事件叠加解决方法代码如下
  $('.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)            })        }    });


查看原文:http://newmiracle.cn/?p=1663