Is there anyway to make a div box shake on page load? Like maybe just once or twice?
Update: At this URL I have it still not working on page load, what am I doing wrong?
http://tinyurl.com/79azbav
I think I’m stuck at the onpage load; that failure can be seen here:
Get onpage to work correctly
I’ve also tried initiating the animation with my already implemented body onLoad:
<body onLoad="document.emvForm.EMAIL_FIELD.focus(); document.ready.entertext.shake();" >
But still failing like a champ.
Try something like this:
EDIT:
Changed
Shake()toshake()for consistency with jQuery conventions.EDIT:
In my example the
leftposition is set to25, but you can reduce this for a more subtle effect or increase it for a more pronounced effect.Using the
shakefunction:Here’s a jsFiddle that demonstrates it: http://jsfiddle.net/JppPG/3/