Pregunta

I'm trying to use the jQuery UI bounce effect on a button positioned with css "left" on mouseover. It seems to work, however if you mouse over back and forth over it a few times it moves out of place and sticks to the left. I'm not really sure why it's doing this. Here's my code: http://jsbin.com/afoyiz/1/edit

¿Fue útil?

Solución

Fixed it:

http://jsbin.com/afoyiz/12/edit

This makes sure to only select the button (and animate it) if it isn't already animating - the previous code had a chance of double animating the button bouncing if you timed your mouse movements correctly.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top