Hover Intent Delay on pop out menus

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
BC_Bo
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Fri Jul 15, 2011 9:11 am

Hover Intent Delay on pop out menus

Post by BC_Bo » Fri Mar 06, 2015 6:50 am

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Hover Intent Delay on pop out menus

Post by mazhar » Fri Mar 06, 2015 8:25 am

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.

BC_Bo
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Fri Jul 15, 2011 9:11 am

Re: Hover Intent Delay on pop out menus

Post by BC_Bo » Mon Mar 09, 2015 3:35 pm

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)));

Post Reply