{"id":101689,"date":"2017-01-17T12:09:57","date_gmt":"2017-01-17T12:09:57","guid":{"rendered":"https:\/\/www.megamenu.com\/documentation\/change-arrow-color-copy\/"},"modified":"2020-10-01T10:30:40","modified_gmt":"2020-10-01T09:30:40","slug":"what-is-hover-intent","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/what-is-hover-intent\/","title":{"rendered":"What does &#8220;Hover Intent&#8221; mean?"},"content":{"rendered":"<p>The default Event option is &#8220;Hover Intent&#8221;. This option can be found on the <em>Appearance &gt; Menus<\/em> page.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-108518 size-full\" style=\"max-width: 250px;\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent.png\" alt=\"\" width=\"600\" height=\"604\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent.png 600w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent-150x150.png 150w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent-298x300.png 298w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent-50x50.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/03\/hover_intent-45x45.png 45w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Hover Intent\u00a0is described as &#8220;<em>a plug-in that attempts to determine the user&#8217;s intent&#8230; like a crystal ball, only with mouse movement! It is similar to jQuery&#8217;s hover method. However, instead of calling the handlerIn function immediately, hoverIntent waits until the user&#8217;s mouse slows down enough before making the call.<\/em>&#8221; &#8211; <a href=\"http:\/\/cherne.net\/brian\/resources\/jquery.hoverIntent.html\">Source<\/a><\/p>\n<ul>\n<li>Hover Intent will stop sub menus appearing immediately if the user accidentally\u00a0moves their mouse over a top level menu item. The user must &#8220;intend&#8221; to open the sub menu by holding their cursor over the menu item for a few milliseconds.<\/li>\n<li>Hover Intent will also stop the sub menu from being hidden immediately if the user accidentally moves their cursor away from the sub menu &#8211; the user will have a small window of time to place their cursor back over the sub menu and keep it visible.<\/li>\n<\/ul>\n<h3>Disabling Hover Intent<\/h3>\n<p>If you do not want any delay before showing the sub menu, set the &#8220;Event&#8221; to &#8220;Hover&#8221;.<\/p>\n<h3>Changing the Hover Intent parameters<\/h3>\n<p>To override the default hover intent timings, add the following code to your theme&#8217;s functions.php file:<\/p>\n<pre class=\"lang:default decode:true \">function megamenu_adjust_wrap_attributes( $attributes, $menu_id, $menu_settings, $settings, $current_theme_location ) {\r\n\t$attributes['data-hover-intent-timeout'] = 300;\r\n\t$attributes['data-hover-intent-interval'] = 100;\r\n\treturn $attributes;\r\n}\r\nadd_filter(\"megamenu_wrap_attributes\", \"megamenu_adjust_wrap_attributes\", 10, 5);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The default Event option is &#8220;Hover Intent&#8221;. This option can be found on the Appearance &gt; Menus page. Hover Intent\u00a0is described as &#8220;a plug-in that attempts to determine the user&#8217;s intent&#8230; like a crystal ball, only with mouse movement! It is similar to jQuery&#8217;s hover method. However, instead of calling&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[14],"ht-kb-tag":[],"class_list":["post-101689","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-faqs"],"uagb_featured_image_src":[],"uagb_author_info":{"display_name":"Tom Hemsley","author_link":"https:\/\/www.megamenu.com\/author\/megamenu\/"},"uagb_comment_info":0,"uagb_excerpt":"The default Event option is &#8220;Hover Intent&#8221;. This option can be found on the Appearance &gt; Menus page. Hover Intent\u00a0is described as &#8220;a plug-in that attempts to determine the user&#8217;s intent&#8230; like a crystal ball, only with mouse movement! It is similar to jQuery&#8217;s hover method. However, instead of calling...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/101689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/comments?post=101689"}],"version-history":[{"count":8,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/101689\/revisions"}],"predecessor-version":[{"id":264191,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/101689\/revisions\/264191"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=101689"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=101689"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=101689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}