javascript - Dropdown menu closing after clicking on any input box -
I created a drop-down menu, in which I created a form for search criteria. Now, whenever I click on any input box the menu stops
Here is my HTML code:
and my css code:
.dropdown-large {status: static! Important; } .dropdown-menu-large {margin-left: 16px; Margin-right: 16px; Padding: 20px 0px; } .dropdown-menu-large & gt; Le & gt; Ul padding: 0; Margin: 0; } .dropdown-menu-large & gt; Le & gt; UL & gt; Li {list-style: none; } .dropdown-menu-large & gt; Le & gt; UL & gt; Le & gt; A {display: block; Padding: 3px 20px; Clean both; Font weight: normal; Line-height: 1.428571429; Color: # 333333; White Location: Normal; } .dropdown-menu-large & gt; Lee Ul & gt; Le & gt; One: hover, .dropdown-menu-large & gt; Lee Ul & gt; Le & gt; A: Focus {text-decoration: none; Color: # 262626; Background color: # f5f5f5; } .dropdown-menu-large .disabled & gt; A, .dropdown-menu-large .disabled & gt; A: Hover, .dropdown-menu-large .disabled & gt; A: focus {color: # 999999; } .dropdown-menu-large .disabled & gt; A: Hover, .dropdown-menu-large .disabled & gt; A: Focus {text-decoration: none; Background color: transparent; Background-image: none; Filter: Prozed: DXImageTransform.Microsoft.gradient (enabled = false); Cursor: not allowed; } .dropdown-menu-large .dropdown-header {color: # 428bca; Font-size: 18px; } @ Media (max-width: 768px) {. Dropdown-menu-big {margin-left: 0; Margin-right: 0; } .dropdown-menu-large & gt; Li {margin-bottom: 30px; } .dropdown-menu-large & gt; Li: Last-baby {margin-down: 0; } .dropdown-menu-large .dropdown-header {padding: 3px 15px! Important; }}
: Try $ (document) .on ('click', '.dropdown', function (e) {e.stopPropagation ();});
Comments
Post a Comment