Reputation: 1248
$('#postform').submit(function() {
$(this).ajaxSubmit(options);
return false;
});
The code above is not working when i upgraded my site to jquery 1.9.1
Upvotes: 0
Views: 987
Reputation: 2078
Use jquery ajax to submit your form insted of ajaxSubmit()
syntax.
var frm = $('#postform');
$.ajax({
type: frm.attr('method'),
url: frm.attr('action'),
data: frm.serialize(),
success: function (data, status, xhr) {
//call back handling here
}
});
refrence : http://api.jquery.com/jQuery.ajax/
Upvotes: 2
Reputation: 919
The function ajaxSubmit is not a core function of the jQuery library but a plugin called "form".
You can download in here: http://jquery.malsup.com/form/
After including the corresponding js file into your page, your code should work.
Upvotes: 5