jquery Navigation parts jquery mouse color effect Sample _jquery

Source: Internet
Author: User

Copy Code code as follows:

<meta http-equiv= "Content-type" content= "text/html; Charset=utf8 ">
<title> mouse over navigation the current Li discoloration is at the current position </title>
<style type= "Text/css" >
#nav li{display:inline-block;margin:0 5px;background: #ccc;p adding:0 10px; Line-height:24px;font-size:12px;float:left;}
#nav li.h_nav_over{background:red;color: #fff;}
#nav li.h_nav_over a{color: #fff;}

<script type= "Text/javascript" src= "/jquery-1.10.2.min.js" ></script>

<script type= "Text/javascript"
$ (function () {
$ ("#nav >ul>li"). MouseOver (function () {
        $ ("#nav >ul>li"). each (function (i) {
             $ (this). Removeclass ("H_nav_over");
        $ (this). addclass ("H_nav_over");
   }). Mouseout (function () {
        $ (this). addclass ("H_nav_over");

<div id= "NAV" >
<li><a href= "Http://www.jb51.net" > Home </a></li><li><a href= "http://www.jb51.net/a /"> Brand Opportunities </a></li>
<li><a href= "http://www.jb51.net/" > Boutique Business Opportunities </a></li><li><a href= "http:// www.jb51.net/"> Latest Business Opportunities </a></li>
<li><a href= "http://www.jb51.net/" > Investment visit will </a></li><li><a href= "http:// www.jb51.net/"> Online Communication area </a></li>

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.