发现好像没有hover这个事件,jQuery的hover事件是一个封装,hover算不得一个事件。他只是将mouseover和mouseout合并了
用mouseover和mouseout两个配合效果好像也是一样的。

下面教你用on方法,模拟hover方法。
$(obj).on("mouseover mouseout",function(event){
 if(event.type == "mouseover"){
  //鼠标悬浮
 }else if(event.type == "mouseout"){
  //鼠标离开
 }
})

 

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-08
  • 2021-07-26
  • 2021-08-12
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-05-20
相关资源
相似解决方案