文本教你用on方法,模拟hover方法。
代码如下:
$(obj).on("mouseover mouseout",function(event){
if(event.type == "mouseover"){
//鼠标悬浮
}else if(event.type == "mouseout"){
//鼠标离开
}
})
赶紧去以上就是JQuery使用on方法如何绑定hover事件的代码案例的详细内容,更多请关注Gxl网其它相关文章!
文本教你用on方法,模拟hover方法。
代码如下:
$(obj).on("mouseover mouseout",function(event){
if(event.type == "mouseover"){
//鼠标悬浮
}else if(event.type == "mouseout"){
//鼠标离开
}
})
赶紧去以上就是JQuery使用on方法如何绑定hover事件的代码案例的详细内容,更多请关注Gxl网其它相关文章!