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,384 |
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 |
JQuery - Easy Sticky Nav Bar | 2,551 Kb |
A Pen by Eric Tompkins | 1,243 Kb |
JQuery FullScreen Overlay | 2,252 Kb |
3D Rollover Sign-Up Form | 3,727 Kb |
Responsive Email Template | 4,175 Kb |
Using Meny.js - Create 3D Nav Effect | 3,191 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 |
Jochaho Skeleton | Dhanushbadge | 1,689 Kb |
Custom Select Element | Agrayson | 3,616 Kb |
Hoi hoi | JohnTheCat | 7,248 Kb |
Slide out Menu | Rbiggs | 4,936 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
Replace url via jquery | Serluk | 1,429 Kb |
Button fills | Zubfatal | 5,205 Kb |
Cloudy Spiral CSS animation | Hakimel | 6,587 Kb |
Adding and Removing Element | Accimeesterlin | 2,119 Kb |
Very Simple Slider | Doodlemarks | 2,682 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!