c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
JQuery

How to create menu hover effect using onmouseover and onmouseout in JQuery?

| | JQuery

I know this can be easily to be achieved with css and jQuery. You can apply style on the jQuery event onmouseover and onmouseout. When the user hovers over the menu this event will trigger I will show you how to create effects.

Example:

<html>
<head>
    <title> create menu hover effect using onmouseover andonmouseout in JQuery</title>
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body style="width: 600px;">
        <style type="text/css">
            .menu {
                background-color: #CDDC39;
                list-style: none;
                margin: 100px;
                padding: 0;
                width: 10em;
            }
                .menu li {
                   margin: 0;
                  padding: 5px;
               }
                .menu a {
               color: #333;
               }
        </style>
        <ul class="menu">
            <li onmouseover="this.style.backgroundColor='#F44336';" onmouseout="this.style.backgroundColor='transparent';" style="background-color: transparent;">
                <a href="http://www.infinetsoft.com/">learn dot net skills</a>
            </li>
            <li onmouseover="this.style.backgroundColor='#F44336';" onmouseout="this.style.backgroundColor='transparent';" style="background-color: transparent;">
                <a href="http://www.infinetsoft.com/htmltry">Work out html</a>
            </li>
            <li onmouseover="this.style.backgroundColor='#F44336';" onmouseout="this.style.backgroundColor='transparent';" style="background-color: transparent;">
                <a href="http://www.infinetsoft.com/Category/JQuery/9/1">jQurey tutorials</a>
            </li>
        </ul>
</body>
</html> 

Output:

create menu hover effect using onmouseover and onmouseout in JQuery