{"id":3842,"date":"2024-01-19T17:01:00","date_gmt":"2024-01-19T17:01:00","guid":{"rendered":"https:\/\/codehim.com\/?p=3842"},"modified":"2024-01-22T15:02:26","modified_gmt":"2024-01-22T10:02:26","slug":"simple-dropdown-menu-using-jquery-css","status":"publish","type":"post","link":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/","title":{"rendered":"Simple Dropdown Menu using jQuery and CSS"},"content":{"rendered":"<section class=\"cm-tb\">\n<div class=\"cm-row\">\n<p class=\"plugin-intro\"> Yet another lite version <b>simple dropdown menu<\/b> using jQuery and CSS for mobile-friendly websites. This lightweight menu plugin creates <a href=\"\/tag\/horizontal-menu\/\"> horizontal navbar<\/a> with dropdowns on large screen devices (desktop). It converts into hamburger menu on mobile devices.\n<\/p>\n<p>This drop down menu can be fully customize with additional CSS to fit on your needs.  <\/p>\n<\/p><\/div>\n<\/section>\n<section class=\"codehim-wrapper\">\n<div class=\"d-row\">\n<h2>Plugin Preview<\/h2>\n<figure class=\"item-preview\"> <div id=\"featured-img-id\"><img decoding=\"async\" src=\"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg\" alt=\"Simple Dropdown Menu using jQuery and CSS\" \/><\/div> <\/figure>\n<div class=\"item-like-share\"> <div class=\"codehim-share\"> <span class=\"share-title\">Share this:<\/span> <span class=\"share-btn-container\"> <\/span> <\/div> <\/div>\n<\/div>\n<div class=\"d-row\">\n<h2> Plugin Overview<\/h2>\n<table class=\"plugin-overview\">\n<tbody>\n<tr>\n<td><i class=\"fa fa-plug\"><\/i> Plugin:<\/td>\n<td>Dropdown<\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-user\"><\/i> Author:<\/td>\n<td>Murtaza Jafari<\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-file-text-o\"><\/i> Licence:<\/td>\n<td><a href=\"https:\/\/opensource.org\/licenses\/MIT\" class=\"external\" target=\"_blank\" rel=\"noopener noreferrer\"> MIT Licence<\/a><\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-calendar-check-o\"><\/i> Published:<\/td>\n<td class=\"publish-date\">January 19, 2024<\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-github\"><\/i>Repository:<\/td>\n<td> <a href=\"https:\/\/github.com\/murtazajafari\/dropdown\" target=\"_blank\" class=\"external\" rel=\"noopener noreferrer\">Fork on GitHub <\/a><\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-link\"><\/i> Dependencies:<\/td>\n<td><a href=\"https:\/\/jquery.com\/download\/\" target=\"_blank\" class=\"external\" rel=\"noopener noreferrer\">jQuery 1.3.1 <\/a> or Latest version and  <a href=\"https:\/\/materialdesignicons.com\/\" class=\"external\" target=\"_blank\" rel=\"noopener noreferrer\"> Material Design Icons <\/a><\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-file-code-o\"><\/i> File Type:<\/td>\n<td>zip archive (HTML, CSS &#038; JavaScript )<\/td>\n<\/tr>\n<tr>\n<td><i class=\"fa fa-file-archive-o\"><\/i> Package Size:<\/td>\n<td>4.62 KB <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/section>\n<p><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-######\"\n     data-ad-slot=\"3103593451\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<div class=\"cd-action\"><a class=\"btn demo\" target=\"_blank\" href=\"\/demo\/jquery-simple-dropdown\/\" rel=\"nofollow noopener noreferrer\"> Demo <\/a><a class=\"btn download\" href=\"\/download\/jquery-simple-dropdown.zip\" rel=\"nofollow\"> Download<\/a><\/div>\n<h2> How to Create Simple Dropdown Menu using jQuery<\/h2>\n<p>1. First of all load jQuery and Material Icons CSS in the <code>head<\/code> tag of your HTML document to getting ready with dropdown menu. <\/p>\n<pre class=\"prettyprint lang-html\">\r\n&lt;!-- jQuery --&gt;\r\n&lt;script src=\"https:\/\/code.jquery.com\/jquery-3.4.1.min.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;!-- Material Icons CSS --&gt;\r\n&lt;link rel=\"stylesheet\" href=\"https:\/\/fonts.googleapis.com\/icon?family=Material+Icons\"&gt;\r\n<\/pre>\n<p>2. Now, create HTML <code>nav<\/code> element and place list of your dropdown navigation links in it. The <code>  &lt;i class=\"material-icons\"&gt;menu&lt;\/i&gt; <\/code> define material menu icon that will be show on small screen (mobile device). <\/p>\n<pre class=\"prettyprint lang-html\">\r\n &lt;nav&gt;\r\n        &lt;div&gt;\r\n            &lt;i class=\"material-icons\"&gt;menu&lt;\/i&gt;\r\n        &lt;\/div&gt;\r\n        &lt;ul&gt;\r\n            &lt;li&gt;&lt;a href=\"#\"&gt;Home&lt;\/a&gt;&lt;\/li&gt;\r\n            &lt;li&gt;\r\n                &lt;a href=\"#\"&gt;Dropdown 1&lt;\/a&gt;\r\n                &lt;ul&gt;\r\n                    &lt;li&gt;&lt;a href=\"#\"&gt;Product 1&lt;\/a&gt;&lt;\/li&gt;\r\n                    &lt;li&gt;&lt;a href=\"#\"&gt;Product 2&lt;\/a&gt;&lt;\/li&gt;\r\n                    &lt;li&gt;&lt;a href=\"#\"&gt;Product 3&lt;\/a&gt;&lt;\/li&gt;\r\n                &lt;\/ul&gt;\r\n            \r\n            &lt;\/li&gt;\r\n            &lt;li&gt;&lt;a href=\"#\"&gt;About&lt;\/a&gt;&lt;\/li&gt;\r\n            &lt;li&gt;&lt;a href=\"#\"&gt;FAQ&lt;\/a&gt;&lt;\/li&gt;\r\n        &lt;\/ul&gt;\r\n    &lt;\/nav&gt;\r\n<\/pre>\n<p><b>Tip: <\/b> <i> To add more dropdowns in navbar, use the above mentioned nested list structure. <\/i> <\/p>\n<p>3. After that, style your dropdown menu with CSS.<\/p>\n<pre class=\"prettyprint lang-css\">\r\nnav div {\r\n  padding: 0.6em;\r\n  background: #e3e3e3;\r\n  display: none;\r\n  cursor: pointer;\r\n  color: #292929;\r\n  font-size: 24px;\r\n}\r\n\r\nul {\r\n  margin: 0px;\r\n  padding: 0px;\r\n  background: #e3e3e3;\r\n  list-style-type: none;\r\n  position: relative;\r\n}\r\n\r\nul li {\r\n  display: inline-block;\r\n}\r\n\r\nul li a {\r\n  padding: 15px;\r\n  color: #292929;\r\n  text-decoration: none;\r\n  display: block;\r\n}\r\n\r\nul li:hover {\r\n  background: lightgrey;\r\n}\r\n\r\nul ul {\r\n  position: absolute;\r\n  min-width: auto;\r\n  background: lightgrey;\r\n  display: none;\r\n}\r\n\r\nul ul li {\r\n  display: block;\r\n  background: #e3e3e3;\r\n}\r\n\r\nul li:hover ul {\r\n  display: block;\r\n}\r\n\r\n@media (max-width: 768px) {\r\n  nav div {\r\n    display: block;\r\n  }\r\n  ul {\r\n    display: none;\r\n    position: static;\r\n    background: #e3e3e3;\r\n  }\r\n  ul li {\r\n    display: block;\r\n  }\r\n  ul ul {\r\n    position: static;\r\n    background: #e3e3e3;\r\n  }\r\n}\r\n<\/pre>\n<p>4. Finally, insert the following jQuery code in your document and done. <\/p>\n<pre class=\"prettyprint lang-html\">\r\n&lt;script&gt;\r\n$(document).ready(function(){\r\n    $(\"nav div\").click(function(){\r\n            $(\"ul\").slideToggle();\r\n            $(\"ul ul\").css(\"display\", \"none\");\r\n        });\r\n\r\n        \/\/ $(\"ul li\").click(function(){\r\n        \/\/     $(\"ul ul\").slideUp();\r\n        \/\/     $(this).find('ul').slideToggle();\r\n        \/\/ });\r\n        $('ul li').click(function () {\r\n            $(this).siblings().find('ul').slideUp();\r\n            $(this).find('ul').slideToggle();\r\n        });\r\n\r\n        $(window).resize(function(){\r\n            if($(window).width() &gt; 768){\r\n                $(\"ul\").removeAttr('style');\r\n            }\r\n        });\r\n });\r\n&lt;\/script&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Yet another lite version simple dropdown menu using jQuery and CSS for mobile-friendly websites. This lightweight menu plugin creates horizontal&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[38],"tags":[9,15],"class_list":["post-3842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-menu","tag-dropdown-menu","tag-horizontal-menu"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Simple Dropdown Menu using jQuery and CSS &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a code and demo of responsive simple dropdown menu using jQuery and CSS. The menu creates horizontal bar on desktop and hamburger on mobile.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simple Dropdown Menu using jQuery and CSS &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a code and demo of responsive simple dropdown menu using jQuery and CSS. The menu creates horizontal bar on desktop and hamburger on mobile.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-19T17:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T10:02:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"962\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Simple Dropdown Menu using jQuery and CSS\",\"datePublished\":\"2024-01-19T17:01:00+00:00\",\"dateModified\":\"2024-01-22T10:02:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\"},\"wordCount\":192,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg\",\"keywords\":[\"Dropdown Menu\",\"Horizontal Menu\"],\"articleSection\":[\"Menu &amp; Nav\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\",\"url\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\",\"name\":\"Simple Dropdown Menu using jQuery and CSS &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg\",\"datePublished\":\"2024-01-19T17:01:00+00:00\",\"dateModified\":\"2024-01-22T10:02:26+00:00\",\"description\":\"Here is a code and demo of responsive simple dropdown menu using jQuery and CSS. The menu creates horizontal bar on desktop and hamburger on mobile.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg\",\"width\":1280,\"height\":962,\"caption\":\"Simple Dropdown Menu using jQuery and CSS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Menu &amp; Nav\",\"item\":\"https:\/\/codehim.com\/category\/menu\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Simple Dropdown Menu using jQuery and CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Simple Dropdown Menu using jQuery and CSS &#8212; CodeHim","description":"Here is a code and demo of responsive simple dropdown menu using jQuery and CSS. The menu creates horizontal bar on desktop and hamburger on mobile.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/","og_locale":"en_US","og_type":"article","og_title":"Simple Dropdown Menu using jQuery and CSS &#8212; CodeHim","og_description":"Here is a code and demo of responsive simple dropdown menu using jQuery and CSS. The menu creates horizontal bar on desktop and hamburger on mobile.","og_url":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-19T17:01:00+00:00","article_modified_time":"2024-01-22T10:02:26+00:00","og_image":[{"width":1280,"height":962,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg","type":"image\/jpeg"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Simple Dropdown Menu using jQuery and CSS","datePublished":"2024-01-19T17:01:00+00:00","dateModified":"2024-01-22T10:02:26+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/"},"wordCount":192,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg","keywords":["Dropdown Menu","Horizontal Menu"],"articleSection":["Menu &amp; Nav"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/","url":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/","name":"Simple Dropdown Menu using jQuery and CSS &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg","datePublished":"2024-01-19T17:01:00+00:00","dateModified":"2024-01-22T10:02:26+00:00","description":"Here is a code and demo of responsive simple dropdown menu using jQuery and CSS. The menu creates horizontal bar on desktop and hamburger on mobile.","breadcrumb":{"@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2019\/08\/simple-dropdown-jquery-css-codehim.jpg","width":1280,"height":962,"caption":"Simple Dropdown Menu using jQuery and CSS"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/menu\/simple-dropdown-menu-using-jquery-css\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Menu &amp; Nav","item":"https:\/\/codehim.com\/category\/menu\/"},{"@type":"ListItem","position":3,"name":"Simple Dropdown Menu using jQuery and CSS"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":16985,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/3842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=3842"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/3842\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=3842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=3842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=3842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}