I'm doing a textbox and if the requirements does not meet then the background will change to yellow but I only want the background to stay yellow for 3 seconds....how can I do that?
This is what I have at the moment but the yellow bg stays...
$("#form").on("submit",function(){
user = $("#username").val().length;
userErrorBg = $('#username').css('background','yellow');
if(user < 3 || user > 6)
{
setInterval("userErrorBg",0);
}
})
I'm thinking of putting a clearInterval somewhere but I will need a time count right?