Home Forums WoodMart support forum Dropdowns by clicking on menu text not only on arrows

Dropdowns by clicking on menu text not only on arrows

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #183416

    m.ernestas
    Participant

    Hello

    I want that menu open with subcategory dropdowns by clicking on menu text, not only on arrows. I add that code, and solve that. But big problem is if in menu is only single menu without dropdows it don`t work. How to solve that.

    jQuery(‘.mobile-nav’).on(‘click’, ‘.site-mobile-menu > li > a’, function(e){
    e.preventDefault();
    jQuery(this).parent().find(‘.icon-sub-menu’).click();
    });

    Attachments:
    You must be logged in to view attached files.
    #183479

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for purchasing our theme and contacting our support center.

    Try to use the following JS code instead

    jQuery('.mobile-nav').on('click', '.site-mobile-menu > li.menu-item-has-children > a', function(e){
        e.preventDefault();
        jQuery(this).parent().find('.icon-sub-menu').click();
    });

    Kind Regards
    XTemos Studio

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