Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.