Recommended Posts

Hello,
I just started learning jquery and this problem baffles me
I have divs in a container and when the mouse is over them it resizes the div and shifts the divs in front by a certain offset.
on mouseout it shifts the div by subtracting from that offset. This is the code if you are kind enough to look at it:

It is quite simple really, nothing too complicated in it..
What I found is that when the mouseover and out is rapid or maybe the animation isn't complete..the divs change more than the offset and eventually it overlaps! :'(
Can someone please suggest how to solve this problem?
And thanks .

EDIT:
To test rapidly move mouse over the first div..

0

Share this post

Link to post

Share on other sites

I have an idea how to solve problem
It IS because the animation hasn't completed..hence I am moving the div too early.
I just don't know how to tell the jquery to finish the animation before doing the what mouseover wants.
so maybe something