New Landing How can we help? Themeforest Theme Support Dante Closing Responsive nav menu automatically after click

Viewing 12 posts - 1 through 12 (of 12 total)
  • Posted in: Dante
  • #75685
    Shreyans
    Member
    Post count: 24

    Hi, is there a way, in the responsive menu, when the navbar is collapsed and I open the menu and click on a menu item, to close the nav menu automatically?

    I discovered this JS snippet and tried pasting on the Custom JS Theme option but no luck.

    $('.navbar-collapse a').click(function(){
        $(".navbar-collapse").collapse('hide');
    });
    #75981
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please wrap your code with script tag and try
    <script>
    $(‘.navbar-collapse a’).click(function(){
    $(“.navbar-collapse”).collapse(‘hide’);
    });
    </script>

    #76046
    Shreyans
    Member
    Post count: 24

    Still does not work with the <script> tag!!

    #76104
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    If you provide website URL and wordpress admin login detail so i can debug to fix the issue very soon .
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #76119
    Shreyans
    Member
    Post count: 24
    This reply has been marked as private.
    #76195
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this code

    <script>
    jQuery('ul#menu-mobile-menu li a').click(function(){
       jQuery('div#mobile-menu-wrap').slideUp();
    });
    </script>

    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #76404
    Shreyans
    Member
    Post count: 24

    Hi Mohammad, I found the code online in a forum. Since Dante uses bootstrap, I had searched for “how to collapse menu on click on bootstrap”. If there is any other way to do this, please let me know. THanks.

    #76406
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this code

    <script>
    jQuery('ul#menu-mobile-menu li a').click(function(){
       jQuery('div#mobile-menu-wrap').slideUp();
    });
    </script>

    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #76494
    Shreyans
    Member
    Post count: 24

    hi, the code does not work properly. the menu does not seem to collapse completely. please check it out. thanks.

    Regards,

    Shreyans

    #76497
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi there,
    Unfortunately that is not part of the current theme functionality, and it’s not within the scope of our support to be able to provide that functionality as it is more work than a small customisation. While we’d love to be able to support every customisation request, we simply don’t have the time. We recommend that you seek a freelance developer if you need that functionality, potentially from one of the below resources:

    https://codeable.io

    Home


    http://www.microlancer.com

    Thanks

    #76525
    Shreyans
    Member
    Post count: 24

    thanks!!

    #76527
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its ok .
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register