Home > Web Front-end > JS Tutorial > Use on method to bind hover event instance in JQuery_jquery

Use on method to bind hover event instance in JQuery_jquery

WBOY
Release: 2016-05-16 16:27:57
Original
1504 people have browsed it

The text teaches you how to use the on method and simulate the hover method.

The code is as follows:

Copy code The code is as follows:

$(obj).on("mouseover mouseout",function(event){
if(event.type == "mouseover"){
//Mouse hover
}else if(event.type == "mouseout"){
//Mouse away
}
})

Hurry up and try it~

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