How to load External Content in JQuery

Goud.Kv
Posted by Goud.Kv under jQuery category on | Points: 40 | Views : 384
Below code resolves loading external content in JQuery.

$("#extContent").load("default.html", function(response, status, ehlr) {

// Handling the error

if(status == "error") {
$("#extContent").html("An error occured: " + ehlr.status + " " + ehlr.statusText);
}
});


'.load' is used to load the content .

Comments or Responses

Login to post response