I’m using a function to add a ‘Thank you’ message to a newsletter signup on success.
$('#subForm').animate({opacity : 1}, 300);
} else {
$('#subForm input[type="text"]').val('Thank you');
$('#subForm').animate({opacity : 1}, 300);
}
});
What I am trying to work out is how to remove the ‘Thank you’ value after a few seconds.
You can use
setTimeout():The second argument stands for number of milliseconds of the delay.