Skip to content

Instantly share code, notes, and snippets.

@shadow-identity
Created September 3, 2013 05:21
Show Gist options
  • Save shadow-identity/6419958 to your computer and use it in GitHub Desktop.
Save shadow-identity/6419958 to your computer and use it in GitHub Desktop.
/*<![CDATA[*/
jQuery(function() {
var form = jQuery("#contactform");
form.submit(function(e) {
jQuery("#sendbutton").attr('disabled', true)
jQuery("#sendwrapper").prepend('<span>Sending message, please wait... </span></br>')
jQuery("#ajaxwrapper").load(
form.attr('action') + ' #ajaxwrapper',
form.serializeArray(),
function(responseText, responseStatus) {
jQuery("#sendbutton").attr('disabled', false)
}
);
e.preventDefault();
});
});
/*]]>*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment