Im trying to make a little animated div appear when the user mouses over a button. I have it working however, when you hover the button, it moves out of the hit area and closes again straight away.
Anyone know how to stop this happening? or suggest a bet开发者_Go百科ter way to do it?
code and example here...
http://jsfiddle.net/PnUmM/132/
You can use mouseleave, mounseenter events instead of hover. Here is an example http://jsfiddle.net/7bSXb/.
If you pass only one function to hover
as an argument this function is executed on hover-in and on hover-out. Try to use mouseover
instead of hover
.
精彩评论