What is the equivalent of Ajax.updater in Jquery?
ajax, jquery, ruby-on-rails-3
Solution
In jQuery the Ajax will use as following:
$.ajax({
url: "/billing/add_bill_detail",
type: "get",
dataType: "html",
data: {"pars" : "abc"},
success: function(returnData){
$("#abc").html(returnData);
},
error: function(e){
alert(e);
}
});
Use #abc if abc is the id of the div or use .abc if abc is a class.
You can place the returnData iin your HTML where you want,
Problem
Please let me know the equivalent of below prototype code in Jquery. ``` var myAjax = new Ajax.Updater('abc', '/billing/add_bill_detail', { method: 'get', parameters: pars, insertion: Insertion.Bottom }); ``` I want to perform the same action using Jquery. Thanks in Advance.