Jump to content

[SOLVED] "shaking" effect on form fields?


galvin

Recommended Posts

Not asking for code, just asking if anyone can point me in the right direction for making a cool "shaking" effect, like the one in the fields at the bottom of this website (http://lonnroth.info).  Just put your cursor in one of the fields and then click to another one and you'll see the field shake.

 

Basically, the field shakes if the field is not filled in correctly.

 

I have a site where I'd really like to use that effect and was just curious if anyone had any idea how to do it.

 

I assume it's done with JavaScript, so that's why I have the question in this forum.

 

Thanks

Greg

Link to comment
https://forums.phpfreaks.com/topic/179522-solved-shaking-effect-on-form-fields/
Share on other sites

The example link you gave uses jquery. Don't really get the script on that example page but you can easily do this by using an onblur event.

The documentation about the shake effect on the jquery site might be handy if you decide to use jquery. http://docs.jquery.com/UI/Effects/Shake#overview

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.