A minilib for fetching the content of a URL using AJAX, without any external dependencies
I found myself often needing to do ajax calls, but not needing the full jQuery. This one-function lib is the result.
Example use
ajax.load('http://some.url/api/data.json',
function onOk(result) { console.log(result); },
function onErr(statusCode) { console.log("Server error: "+statusCode); }); // Optional last argument
Original code from this discussion at Stack Overflow.