Twenty Eleven Menu HoverIntent
-
Heyas, I am using a slightly modified version of the twenty eleven menu and am trying to incorporate hoverIntent to increase the mouseover delay on sub-menus as they tend to disappear too quickly.
I added this to my functions.php to enqueue hoverIntent:
function my_scripts_method() { wp_enqueue_script('hoverIntent'); } add_action('wp_enqueue_scripts', 'my_scripts_method'); ?>
And then I added this to my header:
<?php wp_enqueue_script('hoverIntent' ); wp_head(); ?> <script type="text/javascript" charset="utf-8"> //<![CDATA[ $(document).ready(function() { var config = { interval: 600, sensitivity: 4, timeout: 500 }; $("ul#access li ul.sub-menu").hoverIntent(config); }); //]]> </script>
It is not working. My css menu hover and stuff still works, just that there is no delay on the mouseover bit. What am I doing wrong?
Can anyone please help? Thanks!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Twenty Eleven Menu HoverIntent’ is closed to new replies.