$(ev.target)跟$(this)效果一樣,為什么用前者呢
$('.J_ChangeBg').on('mouseout',function(){ ? ? ? ? ? ?$(this).removeClass('hover'); ? ? ? ?}) $('.J_ChangeBg').on('mouseout',function(ev){ ? ? ? ? ? ?$(ev.target).removeClass('hover'); ? ? ? ?}) ? ?}); ev.target有什么特別嗎
2016-01-16
ev.target是獲得事件的目標元素。但是在ie下會出現兼容問題哦。$(this)就不會出現問題了,指的就是$(".J_ChangeBg")