문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top