通过本文主要向大家介绍了JQuery,on方法,绑定hover事件等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
文本教你用on方法,模拟hover方法。
代码如下:
$(obj).on("mouseover mouseout",function(event){
if(event.type == "mouseover"){
//鼠标悬浮
}else if(event.type == "mouseout"){
//鼠标离开
}
})
赶紧去试试吧~