I would like to access my public gists through javascript, but the following code doesn't work:
$(document).ready(function() {
var url = 'https://api.github.com/users/binroot/gists';
$.getJSON(url, function(data) {
document.write(data[0].description);
});
});
What's wrong?