Assistance with Default Toggle for First Item in Mobile Menu

This topic has 6 replies, 3 voices, and was last updated 3 months, 1 weeks ago ago by Andrew Mitchell

  • Avatar: IanY
    Kay
    Participant
    September 16, 2024 at 19:05

    Hi there,

    Could you please assist me with setting the first item in the mobile menu to be toggled open by default?

    I tried looking for the appropriate hook to achieve this but haven’t had any success. My goal is for the first item to expand by default, allowing users to view its options right away, while still being able to interact with the other menu items as usual.

    I attempted to handle this with CSS, but it caused the menu item to stay open permanently, even when users tried to close it or open another item.

    Thank you for your help!

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    September 17, 2024 at 11:19

    Dear Kay,

    We hope this message finds you well. We are currently experiencing difficulties accessing your website and kindly request that you temporarily disable the firewall. This would greatly assist us in proceeding with our necessary tasks.

    For your reference, the website in question is: [https://prnt.sc/m9gOXwcSrEho](https://prnt.sc/m9gOXwcSrEho)

    We appreciate your prompt attention to this matter and thank you in advance for your cooperation.

    Best regards,
    The 8Theme’s Team

    Avatar: IanY
    Kay
    Participant
    September 17, 2024 at 18:02

    We have temporarily lifted the block to ensure ease of access. Kindly let us know once you have completed the necessary tasks, and we will reactivate the firewall.

    Thank you for your help

    Avatar: Justin
    Luca Rossi
    Support staff
    September 18, 2024 at 08:59

    Hi @Kay,

    Please add the following code under functions.php file locates in your child theme:

    
    add_action('wp_footer', 'n2t_wp_footer');
    function n2t_wp_footer(){
        ?>
        <script>
            jQuery( function($){
                $(document).ready(function(){
                    setTimeout(function(){
                        $('.header-mobile-menu li.menu-item-106323').addClass('over');
                        $('.header-mobile-menu li.menu-item-106323 .nav-sublist-dropdown').show();
                    }, 500);
                })
            });
        </script>
        <?php
    }
    

    Hope it helps!

    Avatar: IanY
    Kay
    Participant
    September 18, 2024 at 20:15

    it worked! thanks a lot for the help.

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    September 18, 2024 at 20:15

    Dear Kay,

    In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?

    Click here to share your thoughts: https://themeforest.net/downloads

    Being part of our community means a lot, and your feedback contributes immensely.

    Best Regards,
    The 8Theme Team

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘Assistance with Default Toggle for First Item in Mobile Menu’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.