Home >Web Front-end >JS Tutorial >Skillfully use jquery to solve problems related to drop-down menus being blocked by Div_jquery

Skillfully use jquery to solve problems related to drop-down menus being blocked by Div_jquery

WBOY
WBOYOriginal
2016-05-16 17:00:051179browse

Use jquery's hover event to set the div covering the drop-down menu to a negative value when the mouse moves to the menu, and return to a positive value when the mouse leaves.

The code is as follows:

Copy the code The code is as follows:

$("#menu").hover( function() {
$(".divName").css("z-index", "-1");
}, function() {
$(".divName").css("z-index", "0");
});
Statement:
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