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
Post a Comment