Skip to content

Instantly share code, notes, and snippets.

@jlittlejohn
Created December 13, 2012 21:24
Show Gist options
  • Save jlittlejohn/4280051 to your computer and use it in GitHub Desktop.
Save jlittlejohn/4280051 to your computer and use it in GitHub Desktop.
JS: Loading 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