ThemeShaper Forums » Thematic

[closed]

Time Delay on Dropdown Menu...

(8 posts)
  • Started 11 years ago by drewdavid
  • Latest reply from drewdavid
  • This topic is not resolved
  1. Hi I'd like to disable the time delay when hovering over the dropdown menu. I'd like it to drop down immediately!

    Could someone advise me on where this variable is located? Thanks so much. :)

    Best Regards,

    Drew

    Posted 11 years ago #
  2. You may want to modify two things. First the initial hover (mouseover) is controlled by hoverIntent.js

    Just remove it.

    // Load scripts for the jquery Superfish minus hoverIntent.js
    function childtheme_override_head_scripts() {
    	$scriptdir_start = "\t";
    	$scriptdir_start .= '<script type="text/javascript" src="';
    	$scriptdir_start .= get_bloginfo('template_directory');
    	$scriptdir_start .= '/library/scripts/';
    
    	$scriptdir_end = '"></script>';
    
    	$scripts = "\n";
    	$scripts .= $scriptdir_start . 'superfish.js' . $scriptdir_end . "\n";
    	$scripts .= $scriptdir_start . 'supersubs.js' . $scriptdir_end . "\n";
    	$dropdown_options = $scriptdir_start . 'thematic-dropdowns.js' . $scriptdir_end . "\n";
    
    	$scripts = $scripts . apply_filters('thematic_dropdown_options', $dropdown_options);
    
    		$scripts .= "\n";
    		$scripts .= "\t";
    		$scripts .= '<script type="text/javascript">' . "\n";
    		$scripts .= "\t\t" . '/*<![CDATA[*/' . "\n";
    		$scripts .= "\t\t" . 'jQuery.noConflict();' . "\n";
    		$scripts .= "\t\t" . '/*]]>*/' . "\n";
    		$scripts .= "\t";
    		$scripts .= '</script>' . "\n";
    
    	// Print filtered scripts
    	print apply_filters('thematic_head_scripts', $scripts);
    }

    There will also be a delay when you are no longer have your cursor there (mouseout), check into #8 at http://forums.themeshaper.com/topic/thematic-menus-demystified-1 you will see where the delay is.

    Posted 11 years ago #
  3. Thanks Scott!

    Posted 11 years ago #
  4. Hi Scott,

    When you say "remove it", do you mean remove the file hoverIntent.js, or the code that you mention above which is contained in some (which?) file? If the latter, should I tear out all of that code shown?

    Thank you for your help! :)

    Posted 11 years ago #
  5. The code I posted has hoverIntent.js already removed.

    I removed this line $scripts .= $scriptdir_start . 'hoverIntent.js' . $scriptdir_end . "\n";.

    Posted 11 years ago #
  6. Thanks, and is this code all found in header-extensions.php? Just wanting to make sure...

    ...Or is this what I plug in to my child theme's functions.php file?

    Thank you. :)

    Posted 11 years ago #
  7. I grabbed the function from the header-extensions.php file and used the override. It is intended to be thrown in your functions.php. You are correct. ;)

    Posted 11 years ago #
  8. Ok thanks. :)

    Drew

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.