Menu example 1

Developer
Size
2,685 Kb
Views
14,168

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 Previews

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');
});
Menu example 1 - Script Codes
Menu example 1 - Script Codes
Home Page Home
Developer Kev Rousseau
Username kevrousso
Uploaded December 15, 2022
Rating 3
Size 2,685 Kb
Views 14,168
Do you need developer help for Menu example 1?

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!

Kev Rousseau (kevrousso) Script Codes
Create amazing captions 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!