html - JavaScript issue with animating elements on hover -
i'm having slide in menu, contains 3 elements (div's), idea each 1 on hover expands width 33% 60, while @ same time other 2 shrink 20%, therefore 100% never exceeded. two issues having right now: on fast mouse move element 1 element 3, screen starts behave funny, flickers hover on element 2 being called (because mouse goes on element 2 element3), , results in blank space , overflow second or two, until hover function on element 3 takes place. i tried stopping using timeout function, must not solution, did not work once hover off container, hover on element 1, last hovered time, stays @ 60%, , not return. not quite sure set behavior. on hover of element , check, or mouseout, idk. the code.. html <div id="elem1" onmouseover="focusdiv('elem1')"> <div style="position: relative; top: 50%; left: 0">e1</div> </div> <div id="elem2" onmouseover="focusdiv('elem2')"> ...