Hide mobile dropdown nav after click

Home Forums Jevelin Theme Hide mobile dropdown nav after click

Home Forums Jevelin Theme Hide mobile dropdown nav after click

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • fbiazetto
    Participant

    Hi, can you help me with a code to make the mobile dropdown nav hide after click on a menu item? Im using onepage nav so makes no sense to keep the dropdown open after it slides to the section

    Hi @fbiazetto,

     

    I hope you are well today and thank you for your question.

     

    It hides automatically on clicking the menu on mobile. Just make sure to use following latest version of theme.

     


    Please login to access this file

     

    If you are still facing the issue then could you please share me your site URL where it’s happening so that i can troubleshoot it?

     

    Best regards,
    Shufflehound team

    fbiazetto
    Participant

    Hi,

    Actually, the project its already done, so i just cant start over using the latest version of the theme. And im working locally using MAMP so i cant share it yet.

     

    Could you provide the part of the code that make the dropdown hide? So i can integrate it with my current project?

    We can’t support forever the older version of theme as it contains many issues including this so we recommend you to update your theme to the latest version.

     

    You won’t lose anything If you have not made any changes in the theme files.

     

    Before updating just take backup of your site so that if anything goes wrong then you can restore it easily.

    fbiazetto
    Participant

    I have made changes in the theme files…. Lots of changes…

     

    I dont believe that is that hard to make this work, you just have to tell me what you did to fix this when you updated the theme.

    Please use below javascript code to achieve this.

     

        /* Close mobile dropdown on click */
        $('.sh-header-mobile-dropdown li.menu-item:not(.menu-item-has-children)').on( 'click', function() {
            if( $(this).find('> a').attr('href').indexOf("#") >= 0 ) {
                $('.sh-header-mobile .sh-nav-dropdown .c-hamburger').trigger('click').toggleClass('is-active');
            }
        });

     

    If you make changes in the theme file then you have to make these changes again after theme updation as changes made in the theme files get lost on theme updation so it is not recommended at all and using child theme to make changes in the theme is highly recommended.

     

    Find more information about child theme here http://freewptp.com/why-and-how-to-create-wordpress-child-theme/

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

Popular choice

Professional Developers At Your Fingertips!

If you need services beyond standard support, we've got your back!

Services we offer:

Demo setup
Advanced customization
Layout adjustment
Graphic work / visualizations
Custom coding
Full WordPress development and design

Services

What we can offer

  • Demo setup +

    If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.

  • Layout adjustment +

    We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.

  • Advanced customization +

    More complex styling changes, theme option modifications, and third-party integrations.

  • Custom coding +

    If you need something that's not included in the theme, we can code it for you.

  • Graphic work / visualizations +

    Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.

  • Full WordPress development and design +

    Full website builds, custom theme development, or plugin creation from scratch.

  • About pricing +

    We'll provide a clear quote based on what you need. No hidden fees.

Professional Developers At Your Fingertips!

Custom Work Form