{"id":4991,"date":"2022-08-03T02:00:00","date_gmt":"2022-08-03T00:00:00","guid":{"rendered":"https:\/\/alvarotrigo.com\/epa\/drop-down-menu-javascript\/"},"modified":"2024-02-14T13:25:20","modified_gmt":"2024-02-14T12:25:20","slug":"drop-down-menu-javascript","status":"publish","type":"post","link":"https:\/\/alvarotrigo.com\/blog\/drop-down-menu-javascript\/","title":{"rendered":"15 Amazing Drop Down JavaScript Menus [Examples]"},"content":{"rendered":"\n<p>There&#8217;s an element you&#8217;ll find in almost every website or web application in one way or another. And that&#8217;s the <strong>Drop Down effect or &#8220;element&#8221;<\/strong>, usually sharing its name with the <strong>HTML select element<\/strong>, also known as <strong>select tag<\/strong> or <strong>select box<\/strong>.<\/p>\n\n\n\n<p>The select element is an HTML tag that allows us to select one or multiple options, usually in forms.<\/p>\n\n\n\n<p>While the <strong>Drop Down effect<\/strong> or <em>&#8220;element&#8221;<\/em> can also make reference to the visual effect that allows us to navigate submenus in headers, sidebars, or other menu-kind of elements.<\/p>\n\n\n\n<p>In this article, we&#8217;ll be focusing on both. These are simple and easy to integrate into your design, with pure HTML, CSS and some JavaScript.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"15-amazing-javascript-drop-down-menus\">15 Amazing JavaScript Drop Down Menus<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.-pure-javascript-drop-down-menu-example\">1. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/vYRVbzK\" target=\"_blank\" rel=\"noopener nofollow\">Pure javascript drop-down menu example<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_vYRVbzK\" data-src=\"\/\/codepen.io\/anon\/embed\/vYRVbzK?height=450&amp;theme-id=1&amp;slug-hash=vYRVbzK&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed vYRVbzK\" title=\"CodePen Embed vYRVbzK\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/vYRVbzK\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Here&#8217;s a great example of what a <strong>simple Dropdown menu<\/strong> looks like.<\/p>\n\n\n\n<p>The <strong>JavaScript code<\/strong> is super simple. It just binds the click event to the main visible element so once clicked, it will show the submenu.<\/p>\n\n\n\n<p>A very simple yet effective way to create a super simple collapsable menu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2.-simple-vanilla-js-dropdown-menu\">2. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWYOoOX\" target=\"_blank\" rel=\"noopener nofollow\">Simple Vanilla JS dropdown menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_NWYOoOX\" data-src=\"\/\/codepen.io\/anon\/embed\/NWYOoOX?height=450&amp;theme-id=1&amp;slug-hash=NWYOoOX&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed NWYOoOX\" title=\"CodePen Embed NWYOoOX\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWYOoOX\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Here&#8217;s a custom select box element made out of HTML, CSS, and <strong>pure JavaScript<\/strong>.<\/p>\n\n\n\n<p>This kind of dropdown menu mimics the behavior of an HTML Select input by allowing users to select a single option.<\/p>\n\n\n\n<p>The custom style makes it look minimalists and clean. It uses white and blue colors and subtle use of shadows to avoid using hard borders.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3.-custom-drop-down-menu-javascript-code\">3. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExEdrez\" target=\"_blank\" rel=\"noopener nofollow\">Custom Drop Down menu javascript code<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_ExEdrez\" data-src=\"\/\/codepen.io\/anon\/embed\/ExEdrez?height=450&amp;theme-id=1&amp;slug-hash=ExEdrez&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed ExEdrez\" title=\"CodePen Embed ExEdrez\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExEdrez\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A beautiful list of 8 different dropdown menus with different styles.<\/p>\n\n\n\n<p>Four of them react on click while the other 4 do it in mouse hover.<\/p>\n\n\n\n<p>All drop down elements are integrated with pure Vanilla Javascript and require no external vendor library.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5.-drop-down-hover-menu-with-submenus-using-js\">5. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExEdrdB\" target=\"_blank\" rel=\"noopener nofollow\">Drop Down Hover Menu With Submenus Using JS<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_ExEdrdB\" data-src=\"\/\/codepen.io\/anon\/embed\/ExEdrdB?height=450&amp;theme-id=1&amp;slug-hash=ExEdrdB&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed ExEdrdB\" title=\"CodePen Embed ExEdrdB\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExEdrdB\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A great example of a menu dropdown with multiple submenus.<\/p>\n\n\n\n<p>This dropdown menu will display the main items when moving the mouse over it. And, on top of that, the cool thing about this menu is that it provides you with a way of adding submenus within the items on the list.<\/p>\n\n\n\n<p>A great solution to a very common problem that developers face when designing menu headers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6.-beautiful-javascript-drop-down-menu\">6. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/mdxzvQR\" target=\"_blank\" rel=\"noopener nofollow\">Beautiful javascript drop down menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_mdxzvQR\" data-src=\"\/\/codepen.io\/anon\/embed\/mdxzvQR?height=450&amp;theme-id=1&amp;slug-hash=mdxzvQR&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed mdxzvQR\" title=\"CodePen Embed mdxzvQR\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/mdxzvQR\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>This is a beautiful collapsable menu for a sidebar element. Ideal for menus that contain items grouped in different categories.<\/p>\n\n\n\n<p>The menu uses group headings that toggle the collapsable items on the submenu when clicking on them.<\/p>\n\n\n\n<p>It can be a very good option for large side menus with plenty of options. It helps limiting the options for the visitor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7.-animated-javascript-dropdown-menu\">7. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/QWmZYJr\" target=\"_blank\" rel=\"noopener nofollow\">Animated JavaScript Dropdown Menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_QWmZYJr\" data-src=\"\/\/codepen.io\/anon\/embed\/QWmZYJr?height=450&amp;theme-id=1&amp;slug-hash=QWmZYJr&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed QWmZYJr\" title=\"CodePen Embed QWmZYJr\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/QWmZYJr\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A gorgeous example of a submenu that showcases a dropdown with social media icons.<\/p>\n\n\n\n<p>Adding images or icons is usually a great way to improve the user experience on any website. It makes it way faster for users to visualize the items and select the one they need.<\/p>\n\n\n\n<p>This dropdown menu doesn&#8217;t use any external library, making it ideal for those who don&#8217;t want to depend on any particular framework.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"8.-alpine-javascript-dropdown\">8. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExEdrOB\" target=\"_blank\" rel=\"noopener nofollow\">Alpine JavaScript Dropdown<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_ExEdrOB\" data-src=\"\/\/codepen.io\/anon\/embed\/ExEdrOB?height=450&amp;theme-id=1&amp;slug-hash=ExEdrOB&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed ExEdrOB\" title=\"CodePen Embed ExEdrOB\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExEdrOB\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>If you use the Alpine.js framework, this select box might be for you.<\/p>\n\n\n\n<p>Here&#8217;s a basic example of how to integrate an HTML select box with JavaScript logic using Alpine.js.<\/p>\n\n\n\n<p>It also uses TailwindCSS for styling. (Which, might not be ideal for all, but has a simple solution )<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"9.-react-multilevel-dropdown-menu\">9. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/GRxYzPW\" target=\"_blank\" rel=\"noopener nofollow\">React MultiLevel Dropdown Menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_GRxYzPW\" data-src=\"\/\/codepen.io\/anon\/embed\/GRxYzPW?height=450&amp;theme-id=1&amp;slug-hash=GRxYzPW&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed GRxYzPW\" title=\"CodePen Embed GRxYzPW\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/GRxYzPW\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>If you are looking for a dropdown menu to work as a context menu for your web application, then this example is for you.<\/p>\n\n\n\n<p>A beautifully implemented menu that admits icons, grouping categories, and submenus within the menu.<\/p>\n\n\n\n<p>It uses React and the vendor library Popper.js.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"10.-bootstrap-dropdown-menu\">10. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWYOoey\" target=\"_blank\" rel=\"noopener nofollow\">Bootstrap Dropdown Menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_NWYOoey\" data-src=\"\/\/codepen.io\/anon\/embed\/NWYOoey?height=450&amp;theme-id=1&amp;slug-hash=NWYOoey&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed NWYOoey\" title=\"CodePen Embed NWYOoey\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWYOoey\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>If Bootstrap is your thing, then you should consider using this menu.<\/p>\n\n\n\n<p>This <strong>bootstrap dropdown<\/strong> is perfect for buttons that provide users with multiple actions to choose from.<\/p>\n\n\n\n<p>It admits grouping categories and <a href=\"https:\/\/alvarotrigo.com\/blog\/toggle-switch-css\/\">switch toggles<\/a> on the list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"11.-multiple-basic-jquery-dropdown-menus\">11. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/RwMevvo\" target=\"_blank\" rel=\"noopener nofollow\">Multiple Basic jQuery Dropdown Menus<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_RwMevvo\" data-src=\"\/\/codepen.io\/anon\/embed\/RwMevvo?height=450&amp;theme-id=1&amp;slug-hash=RwMevvo&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed RwMevvo\" title=\"CodePen Embed RwMevvo\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/RwMevvo\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>If using jQuery is ok with you, then check out this beauty!<\/p>\n\n\n\n<p>This is a great example of how a dropdown can contain, not only list of items, but also text or images.<\/p>\n\n\n\n<p>This example shows how you can configure this dropdown menu to display on hover and on click, left or right aligned, on the top or at the bottom.<\/p>\n\n\n\n<p>The select box uses a very simple styling making it ideal for minimalistic and white-themed websites.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"13.-header-responsive-dropdown-hover-menu-bar\">13. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/PoRyVVj\" target=\"_blank\" rel=\"noopener nofollow\">Header Responsive Dropdown Hover Menu Bar<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_PoRyVVj\" data-src=\"\/\/codepen.io\/anon\/embed\/PoRyVVj?height=450&amp;theme-id=1&amp;slug-hash=PoRyVVj&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed PoRyVVj\" title=\"CodePen Embed PoRyVVj\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/PoRyVVj\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>This example is a work of art.<\/p>\n\n\n\n<p>Not only do we have a responsive menu, but a <strong>responsive dropdown<\/strong> menu where every single detail has been taken into account.<\/p>\n\n\n\n<p>On the desktop, the submenus will get displayed on mouse hover. On responsive, on click.<\/p>\n\n\n\n<p>I personally love the effect that the menu has on the desktop, and the simplicity it is on responsive mode. Which makes it perfect for all kinds of devices!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"14.-jquery-dropdown-menu\">14. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/MWVPLLZ\" target=\"_blank\" rel=\"noopener nofollow\">jQuery Dropdown Menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_MWVPLLZ\" data-src=\"\/\/codepen.io\/anon\/embed\/MWVPLLZ?height=450&amp;theme-id=1&amp;slug-hash=MWVPLLZ&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed MWVPLLZ\" title=\"CodePen Embed MWVPLLZ\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/MWVPLLZ\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Here&#8217;s another example of a <strong>jQuery dropdown<\/strong>, but this time, mimicking the behavior of an HTML select box.<\/p>\n\n\n\n<p>Because the dropdown uses jQuery, it also allows you to retrieve the selected value of the select box in JavaScript. This way, you can make use of it in your logic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"15.-css-animated-sidebar-dropdown-menu\">15. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/bGvmJoN\" target=\"_blank\" rel=\"noopener nofollow\">CSS Animated Sidebar Dropdown Menu<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_bGvmJoN\" data-src=\"\/\/codepen.io\/anon\/embed\/bGvmJoN?height=450&amp;theme-id=1&amp;slug-hash=bGvmJoN&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed bGvmJoN\" title=\"CodePen Embed bGvmJoN\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/bGvmJoN\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>This is a pure CSS dropdown menu that won&#8217;t involve any JavaScript.<\/p>\n\n\n\n<p>Perhaps is not what you were looking for, but definitely, something to consider if you are looking for a sidebar menu.<\/p>\n\n\n\n<p>The menu includes categories, icons for those, and arrows indicating the state of the submenu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>If you have a webpage, chances are you&#8217;ll have to include some kind of drop-down effect or select element on it. And if you use JavaScript, you&#8217;ll very likely want to bind it with your JavaScript logic.<\/p>\n\n\n\n<p>In this article, we&#8217;ve shown you what we think are <strong>beautiful drop down menus<\/strong>. Menus that you will easily be able to <strong>integrate with your JavaScript code<\/strong>. You can use React, Vue, Angular, or pure simple vanilla JavaScript.<\/p>\n\n\n\n<p>Some, like the drop down effects for headers and menus, will not require much logic from the JavaScript point of view, while others using the HTML select input<br>\nwill do.<\/p>\n\n\n\n<p>In order to use them, simply choose the dropdown menu that you like the most and copy the code to apply it to your website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"related-articles\">Related Articles<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/javascript-alert\/\">JavaScript Alert Examples<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/learn-javascript\/\">How To Learn JavaScript<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/progress-bar-css\/\">20 CSS Progress Bar [CodePens]<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/hamburger-menu-css\/\">10+ CSS Hamburger Menu [CodePens]<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/css-checkbox-styles\/\">Beautiful CSS styles for your checkboxes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/jquery-checkbox-checked\/\">Check If Checkbox Is Checked using jQuery<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve curated a list of Great JavaScript Drop Down effects that you can apply to your website.<\/p>\n","protected":false},"author":1,"featured_media":4990,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[107],"tags":[9,126,10,67],"class_list":["post-4991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-css","tag-inspiration","tag-javascript","tag-web-design"],"acf":[],"_links":{"self":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/4991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/comments?post=4991"}],"version-history":[{"count":3,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/4991\/revisions"}],"predecessor-version":[{"id":9583,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/4991\/revisions\/9583"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media\/4990"}],"wp:attachment":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media?parent=4991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/categories?post=4991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/tags?post=4991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}