This topic has 4 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #200282
     landolf
    Participant

    How can I set the functionality to exit the Side Menu and BuddyPress Menu by either clicking anywhere outside the Menu’s or to swipe away the Menu on mobile? Users don’t really know where to click to close the Menu’s.

    #200293
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #200319
     Radu
    Moderator

    Hi,

    They are toggle, tap on element to open and tap again to close.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #200322
     landolf
    Participant

    Hi Radu,

    I want users to be able to close these menu’s by clicking anywhere outside the Menu and not only on the toggle buttons. It will be great if you can slide the Menu away on mobile.

    #200353
     Radu
    Moderator

    Ok Just add this code to wp-admin -> theme options -> Quick Javascript

    COPY CODE
    
                $( document ).ready(function() {
    
                    /* Close sidemenu and second menu when clicking outside only on mobile XS */
                    $(document).click(function (event) {
                        if (!$(event.target).closest('.second-menu').length && $('body').hasClass('device-xs')) {
                            $("body").removeClass("sidemenu-is-open second-menu-is-open");
                        }
                    });
                });
    

    Let me know
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?