Javascript Navigation Menu

In Progress

I have inherited a website and have been requested to change a navigation menu. The issue with the menu is that when a user hovers over a selection and wants to select a submenu item, they sometimes catch the edge of an adjacent parent item. This instantly changes the submenu selection. I would like to add a delay or someother type of logic so that the submenu does not change unless there is clear inention of selection. I have already looked at hoverIntent and this looks like exactly what I need. However, the menu appears to use "mouseenter" and "mouseleave" rather than hover. I am a complete n00b and have zero clue how to get this working. Below is the code, and you can see the menu in action here; [url removed, login to view]

// main sub menu effect

jQuery(".nav > li").not(".nav ul li").bind('mouseenter',function(){

var submenu = jQuery(this).find( '.sub' );

if(jQuery('#content').css('margin-top')!='10px' && jQuery('#content').css('margin-top')!='0px'){

// fast transition

jQuery('#content').clearQueue();

jQuery('#content').stop();

jQuery('#content').css('margin-top','265px');

jQuery('.nav li .sub').clearQueue();

jQuery('.nav li .sub').stop();

jQuery('.nav li .sub').hide();

jQuery(submenu).show();

}else{

//normal transition

jQuery('#content').clearQueue();

jQuery('#content').stop();

jQuery('.nav li .sub').clearQueue();

jQuery('.nav li .sub').stop();

jQuery('.nav li .sub').slideUp(500);

jQuery('#content').animate({'margin-top':'10px'},500,function(){

jQuery(submenu).slideDown(500);

jQuery('#content').animate({'margin-top':'265px'},500);

});

}

});

jQuery(".nav > li").not(".nav ul li").bind('mouseleave',function(){

jQuery('#content').clearQueue();

jQuery('#content').stop();

jQuery('.nav li .sub').clearQueue();

jQuery('.nav li .sub').stop();

jQuery('.nav li .sub').delay(500).slideUp(500);

jQuery('#content').delay(500).animate({'margin-top':'10px'},500,function(){

jQuery('.nav li .sub').removeAttr('style');

});

});

Skills: Javascript, jQuery / Prototype

See more: ul com, how to get a prototype, how to animate website, get prototype, find javascript, find instantly, find animate, what is edge animate, website menu issue, jquery css javascript, inherited, edge animate, jquery css hover, effect javascript, javascript add css, menu show, javascript css show, complete css menu, javascript hide show, jquery change css style, jquery show hide hover, add hover delay css, jquery menu nav, menu code, jquery amp

About the Employer:
( 2 reviews ) Campbell, United States

Project ID: #2555244

Awarded to:

jDevAndDesign

please check your pmb

$50 USD in 3 days
(136 Reviews)
6.9

10 freelancers are bidding on average $80 for this job

crystalcloudteam

You will find a fully customized elegant and outstanding design with all the features as required by you.See portfolio and samples attached.

$150 USD in 3 days
(10 Reviews)
5.2
OShuqair

Hi there, am ready to help you, i have 6 years of experience. Othman

$125 USD in 2 days
(3 Reviews)
4.5
imian

We are Web development expert and can get the issue resolved quickly. Please see details in PMB.

$144 USD in 2 days
(1 Review)
4.1
sujoymondal87

Hello,I am interested.Can fix it immediately.Please check your PM

$49 USD in 1 day
(9 Reviews)
4.0
itdv

I can do this job perfectly.

$80 USD in 1 day
(7 Reviews)
3.5
TechOnWrox

Hi Sir, ready to start. please check your PM.

$40 USD in 1 day
(4 Reviews)
3.4
ChronicSoft

READY TO FIX THIS RIGHT NOW. PLEASE CHECK THE PMB.

$50 USD in 0 days
(3 Reviews)
2.3
InnovationsLTD

Hello, we are company based in Bulgaria, Italy and Ukraine - 2 web designers (PS, FLASH, Corel Draw, Dreamweaver), 3 programmers (front-end) and 2 server side programmers(php, .NET, JAVA). I am front end developer (JS More

$60 USD in 1 day
(0 Reviews)
0.0
wehavesolution

Ready to assist you on your project. Experience in css, html, php javascript and my sql database Graphic, Web Designing, Illustration, Animation. With 100% completion rate, Two time Bonus payment from two clien More

$50 USD in 1 day
(0 Reviews)
0.0