• vajnabotond

    (@vajnabotond)


    when you hover over the menu button a dropdown menu appears, my client wants not to appear when hovering, but only when you click.

    for example now the button on hover:
    page
    -subpage1
    -subpage2

    he wants that when hovering noting to happen, and when you click:

    page
    -page
    -subpage1
    -subpage2

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme are you using?

    Thread Starter vajnabotond

    (@vajnabotond)

    child with twentytwelwe

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try some jQuery;

    jQuery(document).ready(function($) {
    
     $('nav ul ul').hide();
    
     $('nav ul a').click(function(){
      $(this).children().show();
     });
    
    });

    You may need to remove (override) the CSS that currently operates the dropdown.

    Thread Starter vajnabotond

    (@vajnabotond)

    and where I put this code?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    First modify it to suit your navigation elements.
    Then enqueue your script as guided.

    Thread Starter vajnabotond

    (@vajnabotond)

    there is no easier solution for touchscreens?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘change rollover menu to click’ is closed to new replies.