Home > Article > Web Front-end > Code example of how to bind hover event using JQuery's on method
This article mainly introduces the use of on method to bind hover event examples in JQuery. This article is used in some special circumstances. Friends who need it can Refer to the
text below to teach you how to use the on method to simulate the hover method.
The code is as follows:
$(obj).on("mouseover mouseout",function(event){ if(event.type == "mouseover"){ //鼠标悬浮 }else if(event.type == "mouseout"){ //鼠标离开 } }) 赶紧去
The above is the detailed content of Code example of how to bind hover event using JQuery's on method. For more information, please follow other related articles on the PHP Chinese website!