Menu Background Image Rollover

2,147 Kb

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 Previews

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">
<body> <html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Website</title>
<div id="bg"> <img id="bg-one" src="" /> <img id="bg-two" class="hidden" src="" /> <img id="bg-three" class="hidden" src="" /> <img id="bg-four" class="hidden" src="" /> <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>
</html> <script src=''></script> <script src="js/index.js"></script>

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-"; $(over).fadeIn("slow"); lastOver.fadeOut("slow"); lastOver = $(over); }); });
Menu Background Image Rollover - Script Codes
Menu Background Image Rollover - Script Codes
Home Page Home
Developer Eric Tompkins
Username _codemics
Uploaded August 27, 2022
Rating 3
Size 2,147 Kb
Views 32,368
Do you need developer help for Menu Background Image Rollover?

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!

Eric Tompkins (_codemics) Script Codes
Create amazing sales emails with AI!

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!