jquery - Javascript menu behaviour inverted if mouse is on menu when page is loading -


i'm getting crazy javascript menu. website dday.it , menu javascript pull down ajax loading. i'm trying fight issue quite annoying: if mouse on menu (accidentaly) when page loading, behaviour of menu inverted: normal state open, hover state closed.

you can try live on website using chrome.

i want solve myself (i'm rails developer i'm learning js) , cannot figure why behaviour change on page loading if js loaded , executed @ end of page...

added code: here gist

the faulty code in line 232: $navcontainer.addclass('animating').toggleclass('open');

it belongs function animatemenutoggle should receive status parameter (can passed function tooglemenu).

then, can use status parameter like: $navcontainer.addclass('animating').removeclass('open close').addclass(status);


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -