Skip to content

Instantly share code, notes, and snippets.

@quawn
Last active January 4, 2016 03:19
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 quawn/8560640 to your computer and use it in GitHub Desktop.
Save quawn/8560640 to your computer and use it in GitHub Desktop.
JS: Load external content
$("#content").load("somefile.html", function(response, status, xhr) {
// error handling
if(status == "error") {
$("#content").html("An error occured: " + xhr.status + " " + xhr.statusText);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment