Menu example 1
How do I make an menu example 1?
What is a menu example 1? How do you make a menu example 1? This script and codes were developed by Kev Rousseau on 15 December 2022, Thursday.
Menu example 1 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu example 1</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://opensource.keycdn.com/fontawesome/4.7.0/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="menu"> <ul> <li class='menu-item fa fa-home home'> <a href="#home"> <ul> <li><a href="#" data-id='catalog'>Catalog</a></li> <li><a href="#" data-id='dev'>Dev's Corner</a></li> <li><a href="#" data-id='prototype'>Prototypes</a></li> </ul></a> </li> <li id='catalog' class='menu-item'> <a href="#">Catalog</a> <ul> <li>Catalog - Page 1</li> <li>Catalog - Page 2</li> </ul> </li> <li id='dev' class='menu-item'> <a href="#">Dev's Corner</a> <ul> <li>Dev's Corner - Page 1</li> <li>Dev's Corner - Page 2</li> </ul> </li> <li id='prototype' class='menu-item'> <a href="#">Prototypes</a> <ul> <li>Prototypes - Page 1</li> <li>Prototypes - Page 2</li> </ul> </li> </ul>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Menu example 1 - Script Codes CSS Codes
body { background: #131313; color: #f1f1f1;
}
body a { color: #BADA55;
}
body .menu ul { list-style: none;
}
.menu { font-size: 2em;
}
.menu .menu-item { display: inline-block; padding: 5px; position: relative;
}
.menu .menu-item:hover ul { min-width: 500px;
}
.menu .menu-item ul { display: none;
}
.menu .menu-item a { text-decoration: none;
}
.menu .menu-item a:hover { text-decoration: underline;
}
.menu-item { position: relative;
}
.menu-item:not(.home) { display: none;
}
.menu-item:hover { cursor: pointer; color: #647b1b;
}
.menu-item:hover ul { position: absolute; display: block; left: 0; padding: 0; margin: 0;
}
.menu-item.active { display: inline-block;
}
.menu-item.active:before { content: ">"; color: #BADA55;
}
.menu-item.active:last-child:after { content: '';
}
Menu example 1 - Script Codes JS Codes
$('.menu-item').on('click', function(e) { var target = e.target; var id = $(target).data('id'); $('.menu-item').removeClass('active'); $("[id='"+id+"']").addClass('active');
});
Developer | Kev Rousseau |
Username | kevrousso |
Uploaded | December 15, 2022 |
Rating | 3 |
Size | 2,685 Kb |
Views | 14,168 |
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 |
Square animation on scroll with instant follow | 5,023 Kb |
Event Dispatching example | 1,725 Kb |
Fing needle in haystack by splicing array in half | 1,707 Kb |
Menu example 2 | 4,107 Kb |
Find needle in haystack by looping through each item one by one | 2,071 Kb |
1-Discover-Backpacker | 8,202 Kb |
Tutorial-Module | 6,953 Kb |
Base Pen | 1,294 Kb |
Centered label in td | 0 Kb |
Notifications | 3,496 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 |
Simple Carousel Pure CSS | Dangvanthanh | 4,080 Kb |
Motion Lines - codevember - 02 - 2016 | Caiocares | 2,744 Kb |
Christ the Redeemer | Prashantsani | 2,208 Kb |
Ripples in water | Nobitagit | 2,704 Kb |
Cool Page Split Effect | Anthonyadamski | 6,128 Kb |
Multi column experiment. | Spylefkaditis | 2,805 Kb |
Basic HTML5 Structure | YuvarajTana | 1,289 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Opening Reveal Modal On Document Ready | Winghouchan | 1,787 Kb |
Blackberry Mock | Zacharyolson | 1,865 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!