Simple menu 3
How do I make an simple menu 3?
This is a simple menu marked up in an ultra-modular fashion (without CSS tag selectors).. What is a simple menu 3? How do you make a simple menu 3? This script and codes were developed by John W. Long on 24 September 2022, Saturday.
Simple menu 3 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple menu 3</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ul class="menubar"> <li class="menubar-item"> <a class="menubar-item-target" href="#">File</a> <ul class="menu"> <li class="menu-item"><a class="menu-item-target" href="#">Open</a></li> <li class="menu-item"><a class="menu-item-target" href="#">Save</a></li> <li class="menu-item"><a class="menu-item-target" href="#">Save as…</a></li> <li class="menu-item"><a class="menu-item-target" href="#">Close</a></li> <li class="menu-separator"></li> <li class="menu-item"><a class="menu-item-target" href="#">Exit</a></li> </ul> </li> <li class="menubar-item"> <a class="menubar-item-target" href="#">Edit</a> <ul class="menu"> <li class="menu-item"><a class="menu-item-target" href="#">Cut</a></li> <li class="menu-item"><a class="menu-item-target" href="#">Copy</a></li> <li class="menu-item"><a class="menu-item-target" href="#">Paste</a></li> </ul> </li> <li class="menubar-item"> <a class="menubar-item-target" href="#">Help</a> <ul class="menu"> <li class="menu-item"><a class="menu-item-target" href="#">About</a></li> </ul> </li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Simple menu 3 - Script Codes CSS Codes
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline;
}
html { line-height: 1;
}
ol, ul { list-style: none;
}
table { border-collapse: collapse; border-spacing: 0;
}
caption, th, td { text-align: left; font-weight: normal; vertical-align: middle;
}
q, blockquote { quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none;
}
a img { border: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block;
}
body { font-family: sans-serif; font-weight: 100; background: #eee;
}
.menubar { background: white; -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; list-style: none; font-size: 14px; padding: 0 10px;
}
.menubar-item { display: inline-block; position: relative;
}
.menubar-item-target { color: black; display: block; padding: 10px 14px; text-decoration: none;
}
.menubar-item-target:hover, .is-selected .menubar-item-target { background: #29a7f5; color: white;
}
.menu { -moz-box-shadow: rgba(0, 0, 0, 0.5) 0 5px 15px; -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 5px 15px; box-shadow: rgba(0, 0, 0, 0.5) 0 5px 15px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; border-top-left-radius: 0; display: none; position: absolute; top: 100%; background: white; list-style: none; width: 15em; padding: 10px 0;
}
.is-selected .menu { display: block;
}
.menu-item-target { color: black; display: block; padding: 8px 20px; text-decoration: none;
}
.menu-item-target:hover { background: #29a7f5; color: white;
}
.menu-separator { border-top: 1px solid #ddd; margin: 8px;
}
Simple menu 3 - Script Codes JS Codes
var Menubar = {};
Menubar.active = false;
Menubar.open = function(el) { var menubar = $(el).closest('.menubar') , item = $(el).closest('.menubar-item') , menu = item.find('.menu').first() ; Menubar.active = true; item.addClass('is-selected') item.siblings().removeClass('is-selected');
};
Menubar.close = function() { $('.menubar-item.is-selected').removeClass('is-selected'); Menubar.active = false;
};
$('.menubar-item').on('click', function(e) { if (!Menubar.active) { Menubar.open(this); e.stopPropagation(); // Keep document.click from firing }
});
$('.menubar-item').on('mouseenter', function() { if (Menubar.active) { Menubar.open(this); }
});
$(document).on('click', function() { Menubar.close();
});
Developer | John W. Long |
Username | jlong |
Uploaded | September 24, 2022 |
Rating | 4 |
Size | 3,414 Kb |
Views | 18,216 |
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 |
Pure CSS Spinners | 2,043 Kb |
Simple menu 1 | 3,420 Kb |
Animated CSS Google Plus-Like Loader | 3,913 Kb |
Horizontal Bar Graph with D3 | 2,944 Kb |
Simple menu 2 | 3,382 Kb |
Donut Graph with D3 | 4,022 Kb |
Mixins for semi-transparent colors | 2,620 Kb |
Animated CSS Heart Throbber | 2,832 Kb |
Modular Form Styles | 3,263 Kb |
Modular Typography | 6,827 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 |
Mobile Sub Menu Concept | Berdejitendra | 2,790 Kb |
Fluid Layout with Float | Jxqr97 | 1,785 Kb |
Css color for svg | Ademilter | 2,392 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Draggable directive | YahyaKacem | 2,277 Kb |
Canvas Orbital Trails v2 | Jackrugile | 3,421 Kb |
Pericles mi loro... | Judag | 4,125 Kb |
IE11 Test | Boostnewmedia | 4,998 Kb |
React TODO | Enieste | 3,320 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!