Page 1 of 1

Hover Intent Delay on pop out menus

Posted: Fri Mar 06, 2015 6:50 am
by BC_Bo
Is there a way to put an intent delay on the pop up/fly out menus in the menu bar on the admin side of the site? I'm frequently frustrated by the menus blocking my view of page content when I moused over them for a fraction of a second while moving the cursor to a different part of the page.

I believe these menus are driven by jquery and I've found the following plug in that looks like it may work, but the code is above my head.
http://cherne.net/brian/resources/jquer ... ntent.html

Re: Hover Intent Delay on pop out menus

Posted: Fri Mar 06, 2015 8:25 am
by mazhar
We took care of this in our upcoming release. We are using the same plugin to put a delay on menus. Its very simple all you need is to add the reference to this script and then make a small update in it.

First of all download this file and save it in your Website/Scripts folder

Code: Select all

http://cherne.net/brian/resources/jquery.hoverIntent.js


Then edit this file and locate following code

Code: Select all

var cfg = {
            interval: 100,
            sensitivity: 6,
            timeout: 0
        };
and update it like

Code: Select all

var cfg = {
            interval: 150,
            sensitivity: 6,
            timeout: 0
        };
Then include this script on Website/Admin/Admin.master file and hopefully that would do the trick.

Re: Hover Intent Delay on pop out menus

Posted: Mon Mar 09, 2015 3:35 pm
by BC_Bo
Thanks, Mazhar! It works great.

For anyone, like me, who didn't know where to add the references to the script...

Open Site > Admin > Admin.master.cs

Within

Code: Select all

protected void Page_Init(object sender, EventArgs e)
Add the following:

Code: Select all

string jqueryhoverIntent = Page.ResolveUrl("~/Scripts/jquery.hoverIntent.js");
head1.Controls.Add(new LiteralControl(string.Format(scriptTag, jqueryhoverIntent)));