Locate transition time for sub menu

7 views
Skip to first unread message

Brandon Sandall

unread,
Sep 25, 2015, 1:38:56 AM9/25/15
to Firebug
My website that I'm working on it rmwindowwashing.com. I have a sub menu under 'Services' that appears when you hover over 'Services'. I don't like the time delay for the sub menu to pop up and go away. I have been using Firebug to try and find what code is affecting the transition time for that sub menu. Any help would be much appreciated.

Sebastian Zartner

unread,
Sep 25, 2015, 4:25:42 AM9/25/15
to Firebug
  1. Inspect the Services menu item.
  2. Switch to the Events side panel.
  3. In there you'll see an event handler assigned to the 'mouseover' event lying within http://rmwindowwashing.com/wp-includes/js/hoverIntent.min.js?ver=1.8.1.
  4. As it is a jQuery plugin you need to search where it is assigned to the menu. So search for hoverIntent within the Script panel.
  5. You will find $menu.hoverIntent(over, out, targets); within http://rmwindowwashing.com/wp-content/themes/accesspress-basic/js/superfish.js?ver=4.4-alpha-34526.
  6. Check hoverIntent's documentation at http://cherne.net/brian/resources/jquery.hoverIntent.html and see that you can influence the delay via the timeout and interval options.
  7. Change the call to hoverIntent() to include the timeout and interval of your choice.
Another approach to this would be to inspect the (hidden) menu itself within the HTML panel, right-click it and choose Break On Attribute Change. When you then hover the Services entry, the script execution stops at the place where the menu is shown. Within the stack trace you will also see that the call comes from hoverIntent the hoverIntent plugin and goes through superfish.

Sebastian
Reply all
Reply to author
Forward
0 new messages