Simple menu 1
How do I make an simple menu 1?
This is a simple menu marked up in a non-modular fashion.. What is a simple menu 1? How do you make a simple menu 1? This script and codes were developed by John W. Long on 24 September 2022, Saturday.
Simple menu 1 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple menu 1</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ul class="menubar"> <li> <a href="#">File</a> <ul> <li><a href="#">Open</a></li> <li><a href="#">Save</a></li> <li><a href="#">Save as…</a></li> <li><a href="#">Close</a></li> <li class="separator"></li> <li><a href="#">Exit</a></li> </ul> </li> <li> <a href="#">Edit</a> <ul> <li><a href="#">Cut</a></li> <li><a href="#">Copy</a></li> <li><a href="#">Paste</a></li> </ul> </li> <li> <a href="#">Help</a> <ul> <li><a 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 1 - 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;
}
ul.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;
}
ul.menubar > li { display: inline-block; position: relative;
}
ul.menubar > li > a { color: black; display: block; padding: 10px 14px; text-decoration: none;
}
ul.menubar > li > a:hover { background: #29a7f5; color: white;
}
ul.menubar > li > ul { -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;
}
ul.menubar > li > ul > li > a { color: black; display: block; padding: 8px 20px; text-decoration: none;
}
ul.menubar > li > ul > li > a:hover { background: #29a7f5; color: white;
}
ul.menubar > li > ul > li.separator { border-top: 1px solid #ddd; margin: 8px;
}
ul.menubar > li.is-selected > a { background: #29a7f5; color: white;
}
ul.menubar > li.is-selected > ul { display: block;
}
Simple menu 1 - Script Codes JS Codes
var Menubar = {};
Menubar.active = false;
Menubar.open = function(el) { var menubar = $(el).closest('ul') , item = $(el).closest('li') , menu = item.find('ul').first() ; Menubar.active = true; item.addClass('is-selected') item.siblings().removeClass('is-selected'); menu.show();
};
Menubar.close = function() { console.log('close'); $('.menubar > li.is-selected').removeClass('is-selected'); Menubar.active = false;
};
$('.menubar > li').on('click', function(e) { if (!Menubar.active) { Menubar.open(this); e.stopPropagation(); // Keep document.click from firing }
})
$('.menubar > li').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 | 3.5 |
Size | 3,420 Kb |
Views | 24,288 |
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 |
Animated CSS Dots Loader | 3,317 Kb |
UserVoice Listboxes | 6,978 Kb |
Animated CSS Timer Spinner | 2,769 Kb |
Animated CSS Heart Throbber | 2,832 Kb |
The Matrix in Sass | 15,344 Kb |
Simple menu 3 | 3,414 Kb |
Animated CSS Flower Spinner | 2,747 Kb |
Simple menu 2 | 3,382 Kb |
Animated CSS Spinner | 2,508 Kb |
Mixins for semi-transparent colors | 2,620 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 |
700 Synapses Per Second | Silentkrange | 2,138 Kb |
Wikipedia Viewer | Thomasvaeth | 2,549 Kb |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
Cloudy Spiral CSS animation | Hakimel | 6,587 Kb |
Wikipedia API | Coderpilot | 2,802 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
HTML5 Breakout | Jaysalvat | 4,873 Kb |
JQuery Validate checkbox group | Lunaman | 2,466 Kb |
Revolving Text Landing Page Trial | TimRuby | 2,976 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!