Another top menu

Developer
Size
3,809 Kb
Views
12,144

How do I make an another top menu?

Another top menu bar, this time with independent menu/search dropdowns. I could probably tighten up the jQ a bit, but its more of a functional demo than a working copy. . What is a another top menu? How do you make a another top menu? This script and codes were developed by BJack on 07 October 2022, Friday.

Another top menu Previews

Another top menu - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Another top menu</title> <link rel='stylesheet prefetch' href='https://s3-us-west-2.amazonaws.com/s.cdpn.io/45816/feather-cp.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ * { transition: all 0.2s ease-in-out; font-family: Arial;
}
html, body { height: 100%; width: 100%; padding: 0; margin: 0 auto;
}
ul, li { padding: 0; margin: 0 auto;
}
[class*='icon'] { display: inline-block; margin: 16px; margin-top: 10px; font-size: 24px; text-align: center; color: #fff; font-size: 3em; cursor: pointer;
}
[class*='icon']:hover { color: #e1e1e1;
}
.navbar { background: #09c; width: 100%; height: 75px; position: absolute; z-index: 99999; box-shadow: 0 0 10px #000;
}
.menu { position: absolute; left: 0;
}
.settings { position: absolute; right: 0;
}
nav { position: absolute; background: #007399; width: 100%; left: 0; top: -100%; z-index: 999; transition-timing: 1s; box-shadow: 0 0 10px #000;
}
nav li { list-style: none; text-align: center;
}
nav li a { display: block; padding: 15px; color: #fff; text-decoration: none; font-size: 24pt;
}
nav li a:hover { background: #0086b3; text-decoration: underline;
}
.search { position: absolute; background: #007399; width: 100%; left: 0; top: -100%; z-index: 999; transition-timing: 1s; box-shadow: 0 0 10px #000; padding: 15px; line-height: 75px;
}
.search h1 { float: left; margin: 0; color: #fff; padding-right: 25px; font-weight: normal;
}
.search input[type='search'] { padding: 10px; width: 250px;
}
.down { top: 74px;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="navbar"> <div class="menu icon-menu"></div> <div class="settings icon-search"></div>
</div>
<nav role='navigation'> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Clients</a></li> <li><a href="#">Contact Us</a></li> </ul>
</nav>
<div class="search"> <h1>Search:</h1><input type="search" />
</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>

Another top menu - Script Codes CSS Codes

* { transition: all 0.2s ease-in-out; font-family: Arial;
}
html, body { height: 100%; width: 100%; padding: 0; margin: 0 auto;
}
ul, li { padding: 0; margin: 0 auto;
}
[class*='icon'] { display: inline-block; margin: 16px; margin-top: 10px; font-size: 24px; text-align: center; color: #fff; font-size: 3em; cursor: pointer;
}
[class*='icon']:hover { color: #e1e1e1;
}
.navbar { background: #09c; width: 100%; height: 75px; position: absolute; z-index: 99999; box-shadow: 0 0 10px #000;
}
.menu { position: absolute; left: 0;
}
.settings { position: absolute; right: 0;
}
nav { position: absolute; background: #007399; width: 100%; left: 0; top: -100%; z-index: 999; transition-timing: 1s; box-shadow: 0 0 10px #000;
}
nav li { list-style: none; text-align: center;
}
nav li a { display: block; padding: 15px; color: #fff; text-decoration: none; font-size: 24pt;
}
nav li a:hover { background: #0086b3; text-decoration: underline;
}
.search { position: absolute; background: #007399; width: 100%; left: 0; top: -100%; z-index: 999; transition-timing: 1s; box-shadow: 0 0 10px #000; padding: 15px; line-height: 75px;
}
.search h1 { float: left; margin: 0; color: #fff; padding-right: 25px; font-weight: normal;
}
.search input[type='search'] { padding: 10px; width: 250px;
}
.down { top: 74px;
}

Another top menu - Script Codes JS Codes

// drop down the menu, and swap the icon to the close icon
$('.menu').click(function(){ $(this).toggleClass('icon-menu'); $(this).toggleClass('icon-cross'); $('nav').toggleClass('down'); $('nav li a').removeClass('down'); $('.search').removeClass('down'); $('.icon-search').removeClass('icon-cross');
});
//Make sure the menu icon behaves corectly when the menu is open
$('nav li a').click(function(){ $('.menu').addClass('icon-menu'); $('.menu').removeClass('icon-cross'); $('nav').toggleClass('down');
});
//show and hide the search bar, also make sure if the menu is open to hide the menu, and ensure the menu icon state is correct
$('.icon-search').click(function(){ $(this).toggleClass('icon-cross'); $('.menu').addClass('icon-menu'); $('.menu').removeClass('icon-cross'); $('.search').toggleClass('down'); $('nav').removeClass('down');
});
Another top menu - Script Codes
Another top menu - Script Codes
Home Page Home
Developer BJack
Username BJack
Uploaded October 07, 2022
Rating 4
Size 3,809 Kb
Views 12,144
Do you need developer help for Another top menu?

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!

BJack (BJack) Script Codes
Create amazing art & images 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!