The problem is that your css definition
left: 20%
seems to be getting overridden. Possibly as a result of bounce
issuing left: 0
and then not properly caching the previous value of left
. What ensues is left: 0
being cached as the proper value and the element getting shot to the left when all is said and done.
What I would suggest is locking this functionality. This will prevent the error, and also will prevent the gaming of the button.
$(document).ready(function() {
var lockMouseover;
$("#button").mouseover(function(){
if( typeof lockMouseover == "undefined" ){
$("#button").effect( "bounce", {times:3}, 300 );
lockMouseover = setTimeout( function(){ var un; lockMouseover = un;}, 950 );
}
});
});
I tested this on your jsbin and it worked.