I would like to put a timeout function to remove these two classes, but I have no idea how to do this. Can someone help me enable a timeout here? Thanks in advance.
.done(function(response) { // Make sure that the formMessages div has the 'success' class. $(formMessages).removeClass('error'); $(formMessages).addClass('success'); // Set the message text. $(formMessages).text('Message sent!'); // Clear the form. $('#name').val(''); $('#email').val(''); $('#message').val(''); //$('#budget').val(''); })
source share