Very simple jQuery dropdown navigation
How do I make an very simple jquery dropdown navigation?
What is a very simple jquery dropdown navigation? How do you make a very simple jquery dropdown navigation? This script and codes were developed by Kevin on 12 August 2022, Friday.
Very simple jQuery dropdown navigation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Very simple jQuery dropdown navigation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="nav"> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li class="dropdown-trigger"><a href="#">Dropdown menu</a> <ul class="dropdown-menu"> <li><a href="#">Dropdown 01</a></li> <li><a href="#">Dropdown 02</a></li> <li><a href="#">Dropdown 03</a></li> </ul> </li> <li><a href="#">Another menu item</a></li> </ul>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Very simple jQuery dropdown navigation - Script Codes CSS Codes
body { background: #aaa; color: white; font-size: 20px; }
.nav { background: #555;
}
.nav ul { padding: 0; margin: 0; list-style: none;
}
.nav li { display: inline-block; padding: 20px 40px; position: relative;
}
.nav li:hover { background: #888;
}
.nav a { color: white; text-decoration: none;
}
.dropdown-menu { display: none; position: absolute; top: 60px; left: 0px;
}
.nav li ul li { display: block; padding: 20px 40px; background: #555;
}
Very simple jQuery dropdown navigation - Script Codes JS Codes
$(document).ready(function(){ $(".dropdown-trigger").click( // switch 'click' for 'hover' if you want the menu to appear on hover. function(){ $('.dropdown-menu').toggle(); });
});
![Very simple jQuery dropdown navigation - Script Codes](http://shots.codepen.io/kevinpowell/pen/RraRQa-512.jpg)
Developer | Kevin |
Username | kevinpowell |
Uploaded | August 12, 2022 |
Rating | 3 |
Size | 1,973 Kb |
Views | 28,336 |
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 |
Margin vs Padding | 1,600 Kb |
Awesome Portfolio demo | 3,635 Kb |
Bootstrap grid basics | 1,559 Kb |
Setting label widths | 1,556 Kb |
CSS outlines | 1,634 Kb |
CSS Grid Area demo | 3,928 Kb |
Explicit and Implicit grid | 2,297 Kb |
A Pen by Kevin | 2,231 Kb |
CSS Grid Area demo - the start | 2,847 Kb |
Parallax only on large screens | 1,956 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 |
Draggable directive | YahyaKacem | 2,277 Kb |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
Twinkling Stars | Ripley6811 | 2,750 Kb |
CSS3 Selectables with information rollover | Jasonmayes | 9,565 Kb |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
Simple content swap | Snografx | 1,859 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Flexbox Grid - equal height | DaveOrDead | 2,855 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!