Create jquery Mask Layer Effect navigation menu code sharing _ jquery

Source: Internet
Author: User
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 ();
})
});

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.