I have a code:
$(this).attr("disabled","disabled");
$(this).animate({'opacity':'0.6'}, 200);
$(this).animate({'opacity':'1'}, 200);
$(this).attr("disabled","");
I want the input to be disabled when keypress'ed, and it will only be enabled when the animation is done.
How can i do this?
Edit: I just realized that I could do this: $(this).delay(200).attr("disabled","");. Is this a good practice?
source
share