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 |
Responsive Email Template | 4,175 Kb |
3D Rollover Sign-Up Form | 3,727 Kb |
Using Meny.js - Create 3D Nav Effect | 3,191 Kb |
JQuery FullScreen Overlay | 2,252 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 |
Tooltip in table | Roine | 3,713 Kb |
Blog | Rottingroom | 1,430 Kb |
Parallax.js | Zmeeey5 | 2,330 Kb |
BlueBox Fork | Huskynation | 12,675 Kb |
Flat Star Wars | Kevinjannis | 37,947 Kb |
Hamburger Menu Animation | Salmanraza | 2,580 Kb |
Light Switch | Bartuc | 4,933 Kb |
Mario | Takaneichinose | 3,902 Kb |
Ghost | Mghayour | 11,738 Kb |
V.35 The Monolith Update - Hero Release Notes | Jordan | 12,045 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!