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
- Import "django.shortcuts" could not be resolved from source in Django Project
- How to add two numbers in Android Studio? | Source Code
- FindViewByID returns null in android studio -SOLVED
- Saving changes is not permitted in SQL SERVER - [SOLVED]
- Restore of database failed. File cannot be restored over the existing. -[SOLVED]
- One or more projects in the solution were not loaded correctly in Visual Studio 2019 | FIXED
- How to find Laptop's Battery Health?
- SOLVED-Related Field got invalid lookup: icontains error in Django
Related Article