Created
December 13, 2012 21:24
-
-
Save jlittlejohn/4280051 to your computer and use it in GitHub Desktop.
JS: Loading External Content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#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