I would like to add a delay of 2 seconds to the following code:
if (length < 20 & warningContainer.is(\':empty\')){
warningContainer.html(minLengthMessage);
el.addClass(\'input-error\');
}
How do I do that?
I tried:
warningContainer.delay(2000).html(minLengthMessage);
PS: I have no clue how to code JQuery
Thank you
setTimeout. Also I have noticed that you are using bitwise AND instead of logical AND inside the if statement. You can read more about it here: stackoverflow.com/questions/7310109/…