Home > Web Front-end > JS Tutorial > Code example of how to bind hover event using JQuery's on method

Code example of how to bind hover event using JQuery's on method

黄舟
Release: 2017-06-26 11:08:31
Original
1612 people have browsed it

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"){
  //鼠标离开
 }
})

赶紧去
Copy after login



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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template