Nature of Javascript


$.ajax({
  url: "test.html",
  cache: false
}).done(function( html ) {
  $("#results").append(html);
});

var x = $("hello there");
var x = function1("argument");

var y = some-js-object;
var x = $.ajax(y);

var y = {
  url: "test.html",
  cache: false
};

var x = $.ajax(y);

function myfunc(html)
{
   //do something
}

x.done(myfunc);

How do I know what get passed to a jquery call back method?

Search for: How do I know what get passed to a jquery call back method?


complete(jqXHR, textStatus)

This call back function expects two arguments. The documentation also has to indicate the nature of each argument. See an example here