Superfish is a script that will add a delay to the hover action. It is used in a lot of themes, for instance I know it is used in the Thematic Theme. Untested, but I think this is how you’d apply it (based on the docs).
function wp88740_enqueue(){
wp_enqueue_script('jquery');
wp_enqueue_script('hoverintent', get_stylesheet_directory() . '/scripts/hoverIntent.js' );
wp_enqueue_script('superfish', get_stylesheet_directory() . '/scripts/superfish.js' );
}
add_action('wp_enqueue_scripts','wp88740_enqueue');
function wp88740_initialize(){ ?>
// initialise Superfish
<script>
jQuery(document).ready(function($){
$("#access ul.menu").superfish();
});
</script>
<?php }
add_action('wp_head','wp88740_initialize');
Related Posts:
- Multi Level Bootstrap Navigation Menu in WordPress
- Show only 2nd level of navigation depending on active navigation
- Custom Nav Walker sub-menu HTML construct
- Generate a tabbed submenu — from taxonomy term or submenu item — with sample content
- Adding different classes to anchor in navigation menu
- how to automatically generate hierarchical menus from hierarchy of pages?
- Can this navigation be done easily in WordPress?
- How to display dynamic content in start_lvl function
- Menus like a CMS
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- Check if menu id = $specific_id – then insert specific
- wp_nav_menu() with multiple Class
- Home Custom Menu Link not Working
- Inserting specific images inside navigation menu
- Trying to Create Menu in WordPress
- How do I add recent posts to the menu?
- Automatically list top level menu item child pages
- Check if menu_item has children or has parent
- Add a submenu to wp_nav_menu
- Give Children Unique ID’s
- confused about wp_list_pages() function – how to display selected top pages with all their subpages
- How to buid wordpress menu with auto width sub-menu items in dropdown menu without any items sharing one line [closed]
- retrieves menu and converts it to a readable array
- Adding toggle-able element after menu item
- How to Add support for sub-menu item description in wordpress?
- Top Nav submenus wpon’t stay open – only in FF and only sometimes [closed]
- Listing Sub-Pages & Sub-Sub-Pages
- Add Different Class on Different Ul in twenty-twentyone theme
- wp_nav_menu container style args
- Bootstrap Theme Migrated to WordPress
- WordPress + Bootstrap: Replace primary navigation menu on mobile?
- How to add all subcategories as submenu in WordPress menu
- How can I click the parent menu then redirect to a special URL?
- Creating navigation out of specific IDs and their children?
- Show all menu levels except top level. How to exclude top level of a menu?
- Where to place a svg chevron down in my custom walker?
- Add href to tag in nav menu for mobile
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Problem with sub-menu container
- Walker_Nav_Menu Add Strings and Class Name
- Add default wp_nav_menu classes to my custom links
- Show Child of Parent Page including all other parents
- nav_menu: how to force a subpage switching on the parent menu
- How can I set the first link in my nav menu to simply be a drop-down to some other pages
- How was this menu system created?
- Display sub menus as separate lists
- Give custom class names to WP nav sub-menu
- Nav walker bootstrap: Display 3rd level and 4th level in dropdown menu
- wp_nav_menu parent in submenu
- How to add toggle-able DOM element after nav menu item?
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Programmatically add a Navigation menu and menu items
- Dynamically exclude menu items from wp_nav_menu
- wp_nav_menu(), how to change class?
- Split up wp_nav_menu with custom walker
- Is there an easy way to replace a custom menu link with a page or post?
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- Mega Menu Walker
- How to Add to Each Menu Link with link text to data-attr?
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- Filter wp_nav_menu()
- Add custom classes to anchor in wp_nav_menu
- How to modify navigation menu of the “My Account” page in WooCommerce
- Custom ID for certain menu item?
- how to create a menu with all sub categories?
- wp_nav_menu: check if the list item has children and add a class to anchor link
- Add data-icon input to WordPress custom menu links
- Displaying Logged-In User Name in WordPress Menu
- Remove current_page_parent nav class from blog index when in CPT
- Add separator to admin submenu
- Remove Container Element From wp_nav_menu() Markup
- Display only page specific sub menu items using Custom Walker
- Add custom meta to nav menu items
- Add Dividers or Separators Between Nav Menu Items
- Display navigation menu item conditionally based on user capabilities
- Add custom html to last sub-menu item
- Show just one level of child pages, wp_list_pages woe
- Removing link ” from ” menu for some “links” without JS
- Show current navigation path from menu
- Remember the last post I read
- Export navigation menu
- Call custom field into menu item
- Use navigation path from menu for permalink
- Exclude Private, Draft pages from Primary Nav when using custom menu
- add span class inside wp_nav_menu link anchor tag
- Add a .last class to the last in each ul.sub-menu
- wp_nav_menu always falls back to a menu
- Prev/Next child navigation for current page?
- wp_get_nav_menu_items how to exclude sub level menu items?
- Add class to top level menu item if it has multiple child levels
- List child pages of a specific page
- How to set limit only on top levels of wp_nav_menu?
- Determine if a navigation item has children
- How show sub menu only using wp_nav_menu()
- What’s the easiest way to duplicate an entire navigation menu?
- How to modify the “after” of last element in wp_nav_menu
- Bootstrap dropdown nav pills not working with wp_nav_menu()
- How to move parent li to end of child ul