I am using ajaxform to handle my form submissions and have encountered a problem with the option variable. I am trying to have the success callback append some HTML to a relative element, as such I am using the $(this)
approach as I would do normally. I can't get it to work, am I missing something simple here? Is there any reason why $(this)
will not work? The plugin url is http://malsup.com/jquery/form/
Thanks in advance
A
The selector references the element so on submit the ajaxform plugin fires. It is as follows $('#formSEIncome').ajaxForm(options)
The options jQuery is as follows:
var options = {
success: function() {
$(this).parents('.trm_expense_cats').find('.itemlist').append('<li>Test</li>');
alert('ok');
} // post-submit callback
};