Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top