ie8下$(document).on('mouseover mouseout','ul li',function(){})的bug

$(document).on('mouseover mouseout','ul li',function(){

  if (event.type == 'mouseover') {
           console.log($(this));
      }else if(event.type == 'mouseout'){
           console.log($(this));
      }

});

上述代码在IE8下会console多个结果,在代码末端添加return false可解决问题;

posted @ 2016-12-08 11:15  huangzebin  阅读(1727)  评论(0编辑  收藏  举报