I\'m a JQuery n00b. I\'m trying to code a very simple using $.get(). The official documentation says
If a request with jQuery.get() returns an error code, it wi
.get()
is just a synonym for .ajax()
with a number of options pre-set. Use ajax() to get the full range of options, including the error
callback.
$.ajax({
type: "GET",
url: "test.htm",
error: function(xhr, statusText) { alert("Error: "+statusText); },
success: function(msg){ alert( "Success: " + msg ); }
}
);