Skip to content

insert the contents of an html file inside a DOM element

Notifications You must be signed in to change notification settings

juanArias8/jquery-ajax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery-load-ajax


Description: insert the contents of an html file inside a DOM element


Using load function

$("#data-load").load("external.html", function (data) {
    console.log(data);
});

Using jQuery AJAX

$.ajax({
    method: "GET",
    url: "external.html",
    cache: false,
    dataType: "html"
}).done(function (html) {
    console.log(html);
    $("#data-get").append(html);
});

About

insert the contents of an html file inside a DOM element

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published