may be doing something like
function shakeText(selector){
$(selector).animate({'padding-left' : '5'} , 1000 , function(){
$(selector).animate({'padding-left' : '0'} , 1000)}
);
}
shakeText('#element')
here is a jsfiddle
题
I would like to provide shake effect for the text inside a textbox when the validation fails. Can some one suggest the jQuery code for the same.
Here's a link that shows the exact requirement. Click here
Thank You.
解决方案
may be doing something like
function shakeText(selector){
$(selector).animate({'padding-left' : '5'} , 1000 , function(){
$(selector).animate({'padding-left' : '0'} , 1000)}
);
}
shakeText('#element')
here is a jsfiddle