Genesis: Custom superfish arguments

// functions.php
function custom_superfish_menu() {
    if ( genesis_get_option('nav_superfish') ) {
			wp_deregister_script('superfish-args');
			wp_enqueue_script('superfish-args', CHILD_URL.'/superfish.args.js', array('jquery'), '1.0', TRUE);
    }
}
add_action('get_header', 'custom_superfish_menu');
// superfish.args.js
jQuery(document).ready(function($) { 
	
	$('#nav ul.superfish, #subnav ul.superfish, #header ul.nav, #header ul.menu').superfish({ 
		delay:       0,		// delay on mouseout 
		speed:       'fast',
		animation:   {opacity:'show',height:'show'},	// fade-in and slide-down animation 
		autoArrows:    false,
		dropShadows: false,		// disable drop shadows
		pathClass:	'current-menu-item',
		onInit:	function(){
			$(this).addClass('my-custom-class');
		}
	});
	
});

1 thought on “Genesis: Custom superfish arguments”

Leave a Comment