I’m working on a web form where I wish to (after form submission) highlight those input fields that weren’t entered correctly.
The highlight effect I wish to create is an endlessly looping animation between background-color: #fcc; and #fff; in the faulty input fields, using jQuery. When one of those fields gain focus, I wish to stop the animation of that field.
I’m fairly off-beat in jQuery and JS, so if anyone could point me in the right direction, I’d be sincerely grateful.
Check out these two jQuery plugins:
Pulse: http://james.padolsey.com/javascript/simple-pulse-plugin-for-jquery/
Seek Attention: http://enhance.qd-creative.co.uk/demo/seekAttention/ (link now dead)
I think Pulse is what you were asking for, but Seek Attention could be useful in some cases as well.
Here is a very rudimentary sample I created using the pulse plug in.
When the user navigates away from the text box it starts pulsing if empty. If they go back and fill it out, it stops pulsing.