form button val changer

$("form").submit(function(e) { var errorCount = 0; setTimeout(function() { errorCount = $(".input-error").length; console.log(errorCount); if (errorCount === 0) { $("input[type='submit']").val("Sending...").attr('disabled', 'disabled'); setTimeout(function() { $("input[type='submit']").val("Send me a Quote").removeAttr('disabled'); }, 2000); } }, 500); });

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.