Skip to content

Instantly share code, notes, and snippets.

@ponelat
Created June 15, 2015 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponelat/e9d6991a66c008e686fd to your computer and use it in GitHub Desktop.
Save ponelat/e9d6991a66c008e686fd to your computer and use it in GitHub Desktop.
jquery.getJson fail
this.fetch = function() {
url = this.url.value
$.getJSON(url).then(function(data){
opts.data.trigger('change', data);
}).fail(function() {
console.error('Failed to load/parse json data from', url);
console.error(arguments);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment