We will create a simple jquery menu, as long as we hover over the navigation bar area, the screen shown to us is: bright menus stand out in a dark background image. jquery navigation is an essential module for a website. When a user browses a website, to view the navigation bar of a website for a specific purpose, highlighting the effect of the navigation bar is the top priority. Therefore, you must use the jquery mask layer. Highlight the operations of the current user using the effect of light and shade.
The Code is as follows:
$ (Function (){
Var $ oe_menu = $ ('# oe_menu ');
Var $ oe_menu_items = $ oe_menu.children
('Lil ');
Var $ oe_overlay = $ ('# oe_overlay ');
$ Oe_menu_items.bind ('mouseenter', function (){
Var $ this = $ (this );
$ This. addClass ('slided selected ');
Export this.children('p'hangzhou.css ('z-
Index', '100'). stop (true, true). slideDown (9999, function (){
$ Oe_menu_items.not
('. Slided'). children ('P'). hide ();
$ This. removeClass ('slided ');
});
}). Bind ('mouseleave ', function (){
Var $ this = $ (this );
$ This. removeClass ('selected'). children
('P').css ('z-Index', '1 ');
});
$ Oe_menu.bind ('mouseenter', function (){
Var $ this = $ (this );
$ Oe_overlay.stop (true, true). fadeTo (200,
0.6 );
$ This. addClass ('hovered ');
}). Bind ('mouseleave ', function (){
Var $ this = $ (this );
$ This. removeClass ('hovered ');
$ Oe_overlay.stop (true, true). fadeTo (200,
0 );
$ Oe_menu_items.children ('P'). hide ();
})
});