Menu Background Image Rollover
How do I make an menu background image rollover?
Use JQuery to change background image on mouse rollover in menu.. What is a menu background image rollover? How do you make a menu background image rollover? This script and codes were developed by Eric Tompkins on 27 August 2022, Saturday.
Menu Background Image Rollover - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu Background Image Rollover</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Website</title>
</head>
<body>
<div id="bg"> <img id="bg-one" src="http://lorempixel.com/450/281/food/" /> <img id="bg-two" class="hidden" src="http://lorempixel.com/450/281/sports/" /> <img id="bg-three" class="hidden" src="http://lorempixel.com/450/281/fashion/" /> <img id="bg-four" class="hidden" src="http://lorempixel.com/450/281/business/" /> <ul> <a href="#"> <li id="one">Food</li> </a> <a href="#"> <li id="two">Sports</li> </a> <a href="#"> <li id="three">Fashion</li> </a><a href="#"> <li id="four">Business</li> </a> </ul>
</div>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Menu Background Image Rollover - Script Codes CSS Codes
@charset "utf-8";
/* CSS Document */
#bg { position: relative; height: 281px; width: 450px; margin: 0 auto; background: #fff;
}
img { position: absolute; left: 0;
}
.hidden { display: none;
}
#bg ul { width: 450px; position: absolute; list-style: none; text-align: center; left: 0; margin: 0; padding: 0;
}
a { text-decoration: none; color: #fff;
}
li { padding: 20px; border-bottom: 1px solid #fff;
}
li:hover { background: #000;
}
Menu Background Image Rollover - Script Codes JS Codes
$(function() { var lastOver = $("#bg-one"); var over; $( "li" ).mouseover(function() { over = "#bg-"+this.id; $(over).fadeIn("slow"); lastOver.fadeOut("slow"); lastOver = $(over); }); });

Developer | Eric Tompkins |
Username | _codemics |
Uploaded | August 27, 2022 |
Rating | 3 |
Size | 2,147 Kb |
Views | 32,368 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Using Meny.js - Create 3D Nav Effect | 3,191 Kb |
3D Rollover Sign-Up Form | 3,727 Kb |
JQuery FullScreen Overlay | 2,252 Kb |
Responsive Email Template | 4,175 Kb |
A Pen by Eric Tompkins | 1,243 Kb |
JQuery - Easy Sticky Nav Bar | 2,551 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
SVG Animation | Thepheer | 4,793 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
A Pen by Tosh | Panev | 2,586 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
Fun animations with CSS3 | Minimalmonkey | 2,360 Kb |
Flat buttons for Eliassen.com | Kdooley89 | 1,737 Kb |
Form Labels | Bartuc | 2,717 Kb |
React TODO | Enieste | 3,320 Kb |
Social Profiles | Lachlanjc | 1,939 Kb |
Profile box | Daniesy | 2,766 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!