I have this function:
<script>
function jQueryAjaxForm(form) {
$.validator.unobtrusive.parse(form);
if ($(form).valid()) {
var ajaxConfig = {
type: 'POST',
url: form.action,
data: new FormData(form),
success: null
}
if ($(form).attr('enctype') == "multipart/form-data") {
ajaxConfig["contentType"] = false;
ajaxConfig["processData"] = false;
}
$.ajax(ajaxConfig);
}
}
</script>
And I'm getting the error at the closing </script> tag.
I've checked all brackets and still have yet to figure out whats wrong with it. Any help would be appreciated