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:
Post your comments / questions
Recent Article
- How to create custom 404 error page in Django?
- Requested setting INSTALLED_APPS, but settings are not configured. You must either define..
- ValueError:All arrays must be of the same length - Python
- Check hostname requires server hostname - SOLVED
- How to restrict access to the page Access only for logged user in Django
- Migration admin.0001_initial is applied before its dependency admin.0001_initial on database default
- Add or change a related_name argument to the definition for 'auth.User.groups' or 'DriverUser.groups'. -Django ERROR
- Addition of two numbers in django python
Related Article