Click to show submenu - twentyten (2 posts)

  1. andymosh
    Posted 1 year ago #

    I'm currently running wordpress on my local machine using MAMP, I am editing the twentyten theme to make my website, I have stripped it bare and I'm currently working on the menu.

    I currently have the menu set vertically, and want the submenu items to show on click instead of on hover.

    I did try adapting a jquery script to work but it did not, I am currently using this:

    add_action( 'wp_enqueue_script', 'load_jquery' );
    function load_jquery() {
        wp_enqueue_script( 'jquery' );
    function my_scripts() { wp_enqueue_script( 'onclick-script', get_bloginfo('template_directory') . '/js/onclick.js', array('jquery') ); }
        add_action('template_redirect', 'my_scripts');

    to load jquery and to run my script that isn't working.

    Any help would be greatly appreciated, I've looked online but I do need help with this personally.

    Thanks, Andy.

  2. andymosh
    Posted 1 year ago #


    This is what I have at the minute, you click Menu Item and the sub-menu item slides down, but it goes behind the main menu, it also disappears when you hover over it and then away.

Topic Closed

This topic has been closed to new replies.

About this Topic