parent
776e478344
commit
04d64cf0a7
|
@ -325,6 +325,26 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* attach a submit handler to the form */
|
||||
$("form.support").submit(function(event) {
|
||||
|
||||
/* stop form from submitting normally */
|
||||
event.preventDefault();
|
||||
|
||||
/* cannot use this directly as it is an HTMLFormElement */
|
||||
var $form = $(this);
|
||||
var $submitbutton = $("form.support input[type='submit']");
|
||||
$submitbutton.val($submitbutton.attr="data-loading-text")
|
||||
|
||||
/* Send the data using post and put the results in a div */
|
||||
$.post($form.attr("action"), $form.serialize(),
|
||||
function(data) {
|
||||
$("#support_form").fadeOut();
|
||||
$("#introduction").append('<div id="support_form_sent">'+data+'</div');
|
||||
}
|
||||
);
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue