Reply To: Edit nav structure, preserve dropdown functionality

Home Forums Support Edit nav structure, preserve dropdown functionality Reply To: Edit nav structure, preserve dropdown functionality

Home Forums Support Edit nav structure, preserve dropdown functionality Reply To: Edit nav structure, preserve dropdown functionality

#232828
Tom
Lead Developer
Lead Developer

It’s technically invalid HTML, but that doesn’t mean it will break at any second. It does however mean that some old browsers might not like it.

You can remove our dropdown.js file and enqueue your own like this:

add_action( 'wp_enqueue_scripts', 'tommi_custom_scripts' );
function tommi_custom_scripts() 
{
    wp_dequeue_script( 'generate-dropdown' );
    wp_enqueue_script( 'tommi-dropdown', get_stylesheet_directory_uri() . "/js/dropdown.js", array( 'jquery' ), '1.0', true );
}

This assumes that you add your custom dropdown.js file into the js folder of your child theme.

Hope this helps 🙂