Loading Html Content Into Div
I am trying to load a HTML file into a DIV and access that whenever i need. This should be done once when loading the script and i can access this no.of time in my code. The HTML
Solution 1:
Load the page, when loaded, get the div you want, and insert it into your contentdiv
.
$.ajax({ url: 'message.html',
success : function(data) {
$('#contentdiv').html($(data).find('#divname'));
}
};
Solution 2:
try this:
$("#contentdiv").html($(message.html).find("#divname"));
Post a Comment for "Loading Html Content Into Div"