Skip to content

Instantly share code, notes, and snippets.

@crazyyy
Last active January 5, 2019 18:29
Show Gist options
  • Save crazyyy/11414309 to your computer and use it in GitHub Desktop.
Save crazyyy/11414309 to your computer and use it in GitHub Desktop.
#js #jquery || load external content into block
$("#content").load("somefile.html", function(response, status, xhr) {
// error handling
if (status == "error") {
$("#content").html("An error occured: " + xhr.status + " " + xhr.statusText);
}
});
@crazyyy
Copy link
Author

crazyyy commented Apr 29, 2014

Загрузка внешнего контента

Вам нужно добавить определенный внешний контент в div? Так вот это очень просто сделать с jQuery, как показано в нижеприведенном примере.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment