How to handle show/hide of multiple dropdown menu












0















I have two dropdown nav menu. I wanna hide "expanded" dropdown menu (About) when I click on another dropdown menu (Products).



Here is my fiddle:



[https://jsfiddle.net/83gLyof6/2/]


TIA










share|improve this question

























  • jfiddle link::: jsfiddle.net/83gLyof6/2

    – Novis
    Sep 30 '18 at 1:49
















0















I have two dropdown nav menu. I wanna hide "expanded" dropdown menu (About) when I click on another dropdown menu (Products).



Here is my fiddle:



[https://jsfiddle.net/83gLyof6/2/]


TIA










share|improve this question

























  • jfiddle link::: jsfiddle.net/83gLyof6/2

    – Novis
    Sep 30 '18 at 1:49














0












0








0








I have two dropdown nav menu. I wanna hide "expanded" dropdown menu (About) when I click on another dropdown menu (Products).



Here is my fiddle:



[https://jsfiddle.net/83gLyof6/2/]


TIA










share|improve this question
















I have two dropdown nav menu. I wanna hide "expanded" dropdown menu (About) when I click on another dropdown menu (Products).



Here is my fiddle:



[https://jsfiddle.net/83gLyof6/2/]


TIA







jquery menu nav






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 30 '18 at 1:48







Novis

















asked Sep 30 '18 at 1:38









NovisNovis

2421725




2421725













  • jfiddle link::: jsfiddle.net/83gLyof6/2

    – Novis
    Sep 30 '18 at 1:49



















  • jfiddle link::: jsfiddle.net/83gLyof6/2

    – Novis
    Sep 30 '18 at 1:49

















jfiddle link::: jsfiddle.net/83gLyof6/2

– Novis
Sep 30 '18 at 1:49





jfiddle link::: jsfiddle.net/83gLyof6/2

– Novis
Sep 30 '18 at 1:49












2 Answers
2






active

oldest

votes


















3














add this $(".dropdown-menu").slideUp("fast"); to dropdown click function.






<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery Hide Dropdown on Click Outside</title>
<style type="text/css">
ul{
padding: 0;
list-style: none;
background: #f2f2f2;
}
ul li{
display: inline-block;
position: relative;
line-height: 21px;
text-align: left;
}
ul li a{
display: block;
padding: 8px 25px;
color: #333;
text-decoration: none;
}
ul li a:hover{
color: #fff;
background: #939393;
}
ul li ul.dropdown-menu{
min-width: 100%; /* Set width of the dropdown */
background: #f2f2f2;
display: none;
position: absolute;
z-index: 999;
left: 0;
}
ul li ul.dropdown-menu li{
display: block;
}
</style>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Show hide popover
$(".dropdown").click(function(){
if(!$(this).find(".dropdown-menu").is(":visible")){

$(".dropdown-menu").slideUp("fast");
$(this).find(".dropdown-menu").slideToggle("fast");
}
else{
$(".dropdown-menu").slideUp("fast");
}
});
});
$(document).on("click", function(event){
var $trigger = $(".dropdown");
if($trigger !== event.target && !$trigger.has(event.target).length){
$(".dropdown-menu").slideUp("fast");
$(this).find(".dropdown-menu").hide;
}
});
</script>
</head>
<body>
<ul>
<li><a href="#">Home</a></li>
<li class="dropdown">
<a href="#">about ▾</a>
<ul class="dropdown-menu">
<li><a href="#">Laptops</a></li>
<li><a href="#">Monitors</a></li>
<li><a href="#">Printers</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#">Products ▾</a>
<ul class="dropdown-menu">
<li><a href="#">Laptops</a></li>
<li><a href="#">Monitors</a></li>
<li><a href="#">Printers</a></li>
</ul>
</li>
<li><a href="#">Contact</a></li>
</ul>
</body>
</html>








share|improve this answer


























  • Worked like a charm :-) Thanks @sooriya

    – Novis
    Sep 30 '18 at 22:56











  • @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

    – dshukertjr
    Sep 30 '18 at 23:04













  • yes you are correct @sooriya. How to handle that as well?

    – Novis
    Sep 30 '18 at 23:08











  • updated my answer..

    – Sooriya Dasanayake
    Nov 21 '18 at 9:45



















1














Quick and dirty way, but it gets the job done:



$(".dropdown").click(function(){
$(".opened-dropdown-menu").slideUp("fast");
$(this).find(".dropdown-menu").toggleClass("opened-dropdown-menu").slideToggle("fast");
});





share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52573874%2fhow-to-handle-show-hide-of-multiple-dropdown-menu%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    add this $(".dropdown-menu").slideUp("fast"); to dropdown click function.






    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery Hide Dropdown on Click Outside</title>
    <style type="text/css">
    ul{
    padding: 0;
    list-style: none;
    background: #f2f2f2;
    }
    ul li{
    display: inline-block;
    position: relative;
    line-height: 21px;
    text-align: left;
    }
    ul li a{
    display: block;
    padding: 8px 25px;
    color: #333;
    text-decoration: none;
    }
    ul li a:hover{
    color: #fff;
    background: #939393;
    }
    ul li ul.dropdown-menu{
    min-width: 100%; /* Set width of the dropdown */
    background: #f2f2f2;
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    }
    ul li ul.dropdown-menu li{
    display: block;
    }
    </style>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    // Show hide popover
    $(".dropdown").click(function(){
    if(!$(this).find(".dropdown-menu").is(":visible")){

    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").slideToggle("fast");
    }
    else{
    $(".dropdown-menu").slideUp("fast");
    }
    });
    });
    $(document).on("click", function(event){
    var $trigger = $(".dropdown");
    if($trigger !== event.target && !$trigger.has(event.target).length){
    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").hide;
    }
    });
    </script>
    </head>
    <body>
    <ul>
    <li><a href="#">Home</a></li>
    <li class="dropdown">
    <a href="#">about ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li class="dropdown">
    <a href="#">Products ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li><a href="#">Contact</a></li>
    </ul>
    </body>
    </html>








    share|improve this answer


























    • Worked like a charm :-) Thanks @sooriya

      – Novis
      Sep 30 '18 at 22:56











    • @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

      – dshukertjr
      Sep 30 '18 at 23:04













    • yes you are correct @sooriya. How to handle that as well?

      – Novis
      Sep 30 '18 at 23:08











    • updated my answer..

      – Sooriya Dasanayake
      Nov 21 '18 at 9:45
















    3














    add this $(".dropdown-menu").slideUp("fast"); to dropdown click function.






    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery Hide Dropdown on Click Outside</title>
    <style type="text/css">
    ul{
    padding: 0;
    list-style: none;
    background: #f2f2f2;
    }
    ul li{
    display: inline-block;
    position: relative;
    line-height: 21px;
    text-align: left;
    }
    ul li a{
    display: block;
    padding: 8px 25px;
    color: #333;
    text-decoration: none;
    }
    ul li a:hover{
    color: #fff;
    background: #939393;
    }
    ul li ul.dropdown-menu{
    min-width: 100%; /* Set width of the dropdown */
    background: #f2f2f2;
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    }
    ul li ul.dropdown-menu li{
    display: block;
    }
    </style>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    // Show hide popover
    $(".dropdown").click(function(){
    if(!$(this).find(".dropdown-menu").is(":visible")){

    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").slideToggle("fast");
    }
    else{
    $(".dropdown-menu").slideUp("fast");
    }
    });
    });
    $(document).on("click", function(event){
    var $trigger = $(".dropdown");
    if($trigger !== event.target && !$trigger.has(event.target).length){
    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").hide;
    }
    });
    </script>
    </head>
    <body>
    <ul>
    <li><a href="#">Home</a></li>
    <li class="dropdown">
    <a href="#">about ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li class="dropdown">
    <a href="#">Products ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li><a href="#">Contact</a></li>
    </ul>
    </body>
    </html>








    share|improve this answer


























    • Worked like a charm :-) Thanks @sooriya

      – Novis
      Sep 30 '18 at 22:56











    • @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

      – dshukertjr
      Sep 30 '18 at 23:04













    • yes you are correct @sooriya. How to handle that as well?

      – Novis
      Sep 30 '18 at 23:08











    • updated my answer..

      – Sooriya Dasanayake
      Nov 21 '18 at 9:45














    3












    3








    3







    add this $(".dropdown-menu").slideUp("fast"); to dropdown click function.






    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery Hide Dropdown on Click Outside</title>
    <style type="text/css">
    ul{
    padding: 0;
    list-style: none;
    background: #f2f2f2;
    }
    ul li{
    display: inline-block;
    position: relative;
    line-height: 21px;
    text-align: left;
    }
    ul li a{
    display: block;
    padding: 8px 25px;
    color: #333;
    text-decoration: none;
    }
    ul li a:hover{
    color: #fff;
    background: #939393;
    }
    ul li ul.dropdown-menu{
    min-width: 100%; /* Set width of the dropdown */
    background: #f2f2f2;
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    }
    ul li ul.dropdown-menu li{
    display: block;
    }
    </style>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    // Show hide popover
    $(".dropdown").click(function(){
    if(!$(this).find(".dropdown-menu").is(":visible")){

    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").slideToggle("fast");
    }
    else{
    $(".dropdown-menu").slideUp("fast");
    }
    });
    });
    $(document).on("click", function(event){
    var $trigger = $(".dropdown");
    if($trigger !== event.target && !$trigger.has(event.target).length){
    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").hide;
    }
    });
    </script>
    </head>
    <body>
    <ul>
    <li><a href="#">Home</a></li>
    <li class="dropdown">
    <a href="#">about ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li class="dropdown">
    <a href="#">Products ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li><a href="#">Contact</a></li>
    </ul>
    </body>
    </html>








    share|improve this answer















    add this $(".dropdown-menu").slideUp("fast"); to dropdown click function.






    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery Hide Dropdown on Click Outside</title>
    <style type="text/css">
    ul{
    padding: 0;
    list-style: none;
    background: #f2f2f2;
    }
    ul li{
    display: inline-block;
    position: relative;
    line-height: 21px;
    text-align: left;
    }
    ul li a{
    display: block;
    padding: 8px 25px;
    color: #333;
    text-decoration: none;
    }
    ul li a:hover{
    color: #fff;
    background: #939393;
    }
    ul li ul.dropdown-menu{
    min-width: 100%; /* Set width of the dropdown */
    background: #f2f2f2;
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    }
    ul li ul.dropdown-menu li{
    display: block;
    }
    </style>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    // Show hide popover
    $(".dropdown").click(function(){
    if(!$(this).find(".dropdown-menu").is(":visible")){

    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").slideToggle("fast");
    }
    else{
    $(".dropdown-menu").slideUp("fast");
    }
    });
    });
    $(document).on("click", function(event){
    var $trigger = $(".dropdown");
    if($trigger !== event.target && !$trigger.has(event.target).length){
    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").hide;
    }
    });
    </script>
    </head>
    <body>
    <ul>
    <li><a href="#">Home</a></li>
    <li class="dropdown">
    <a href="#">about ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li class="dropdown">
    <a href="#">Products ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li><a href="#">Contact</a></li>
    </ul>
    </body>
    </html>








    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery Hide Dropdown on Click Outside</title>
    <style type="text/css">
    ul{
    padding: 0;
    list-style: none;
    background: #f2f2f2;
    }
    ul li{
    display: inline-block;
    position: relative;
    line-height: 21px;
    text-align: left;
    }
    ul li a{
    display: block;
    padding: 8px 25px;
    color: #333;
    text-decoration: none;
    }
    ul li a:hover{
    color: #fff;
    background: #939393;
    }
    ul li ul.dropdown-menu{
    min-width: 100%; /* Set width of the dropdown */
    background: #f2f2f2;
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    }
    ul li ul.dropdown-menu li{
    display: block;
    }
    </style>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    // Show hide popover
    $(".dropdown").click(function(){
    if(!$(this).find(".dropdown-menu").is(":visible")){

    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").slideToggle("fast");
    }
    else{
    $(".dropdown-menu").slideUp("fast");
    }
    });
    });
    $(document).on("click", function(event){
    var $trigger = $(".dropdown");
    if($trigger !== event.target && !$trigger.has(event.target).length){
    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").hide;
    }
    });
    </script>
    </head>
    <body>
    <ul>
    <li><a href="#">Home</a></li>
    <li class="dropdown">
    <a href="#">about ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li class="dropdown">
    <a href="#">Products ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li><a href="#">Contact</a></li>
    </ul>
    </body>
    </html>





    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery Hide Dropdown on Click Outside</title>
    <style type="text/css">
    ul{
    padding: 0;
    list-style: none;
    background: #f2f2f2;
    }
    ul li{
    display: inline-block;
    position: relative;
    line-height: 21px;
    text-align: left;
    }
    ul li a{
    display: block;
    padding: 8px 25px;
    color: #333;
    text-decoration: none;
    }
    ul li a:hover{
    color: #fff;
    background: #939393;
    }
    ul li ul.dropdown-menu{
    min-width: 100%; /* Set width of the dropdown */
    background: #f2f2f2;
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    }
    ul li ul.dropdown-menu li{
    display: block;
    }
    </style>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    // Show hide popover
    $(".dropdown").click(function(){
    if(!$(this).find(".dropdown-menu").is(":visible")){

    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").slideToggle("fast");
    }
    else{
    $(".dropdown-menu").slideUp("fast");
    }
    });
    });
    $(document).on("click", function(event){
    var $trigger = $(".dropdown");
    if($trigger !== event.target && !$trigger.has(event.target).length){
    $(".dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").hide;
    }
    });
    </script>
    </head>
    <body>
    <ul>
    <li><a href="#">Home</a></li>
    <li class="dropdown">
    <a href="#">about ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li class="dropdown">
    <a href="#">Products ▾</a>
    <ul class="dropdown-menu">
    <li><a href="#">Laptops</a></li>
    <li><a href="#">Monitors</a></li>
    <li><a href="#">Printers</a></li>
    </ul>
    </li>
    <li><a href="#">Contact</a></li>
    </ul>
    </body>
    </html>






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 21 '18 at 9:45

























    answered Sep 30 '18 at 10:18









    Sooriya DasanayakeSooriya Dasanayake

    9121411




    9121411













    • Worked like a charm :-) Thanks @sooriya

      – Novis
      Sep 30 '18 at 22:56











    • @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

      – dshukertjr
      Sep 30 '18 at 23:04













    • yes you are correct @sooriya. How to handle that as well?

      – Novis
      Sep 30 '18 at 23:08











    • updated my answer..

      – Sooriya Dasanayake
      Nov 21 '18 at 9:45



















    • Worked like a charm :-) Thanks @sooriya

      – Novis
      Sep 30 '18 at 22:56











    • @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

      – dshukertjr
      Sep 30 '18 at 23:04













    • yes you are correct @sooriya. How to handle that as well?

      – Novis
      Sep 30 '18 at 23:08











    • updated my answer..

      – Sooriya Dasanayake
      Nov 21 '18 at 9:45

















    Worked like a charm :-) Thanks @sooriya

    – Novis
    Sep 30 '18 at 22:56





    Worked like a charm :-) Thanks @sooriya

    – Novis
    Sep 30 '18 at 22:56













    @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

    – dshukertjr
    Sep 30 '18 at 23:04







    @Novis This is okay, but when you want to close a opened menu by clicking the menu again, it would not close.

    – dshukertjr
    Sep 30 '18 at 23:04















    yes you are correct @sooriya. How to handle that as well?

    – Novis
    Sep 30 '18 at 23:08





    yes you are correct @sooriya. How to handle that as well?

    – Novis
    Sep 30 '18 at 23:08













    updated my answer..

    – Sooriya Dasanayake
    Nov 21 '18 at 9:45





    updated my answer..

    – Sooriya Dasanayake
    Nov 21 '18 at 9:45













    1














    Quick and dirty way, but it gets the job done:



    $(".dropdown").click(function(){
    $(".opened-dropdown-menu").slideUp("fast");
    $(this).find(".dropdown-menu").toggleClass("opened-dropdown-menu").slideToggle("fast");
    });





    share|improve this answer




























      1














      Quick and dirty way, but it gets the job done:



      $(".dropdown").click(function(){
      $(".opened-dropdown-menu").slideUp("fast");
      $(this).find(".dropdown-menu").toggleClass("opened-dropdown-menu").slideToggle("fast");
      });





      share|improve this answer


























        1












        1








        1







        Quick and dirty way, but it gets the job done:



        $(".dropdown").click(function(){
        $(".opened-dropdown-menu").slideUp("fast");
        $(this).find(".dropdown-menu").toggleClass("opened-dropdown-menu").slideToggle("fast");
        });





        share|improve this answer













        Quick and dirty way, but it gets the job done:



        $(".dropdown").click(function(){
        $(".opened-dropdown-menu").slideUp("fast");
        $(this).find(".dropdown-menu").toggleClass("opened-dropdown-menu").slideToggle("fast");
        });






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 30 '18 at 2:57









        dshukertjrdshukertjr

        1,7441727




        1,7441727






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52573874%2fhow-to-handle-show-hide-of-multiple-dropdown-menu%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            'app-layout' is not a known element: how to share Component with different Modules

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            SQL update select statement