If you simply want to set the html of a container when any event is raised then simply set the innerHtml or use $(element).html().
If you are looking to load html from external file, then here is a non-jQuery solution:
function LoadHtml(path, div) {
var xmlhttp;
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
else
{
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
}
xmlhttp.onreadystatechange = function ()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
div.innerHtml = xmlhttp.responseText;
}
}
xmlhttp.open('GET', path, true);
xmlhttp.send();
}
and the equivalent jQuery code:
$.get( path ).then(function(data){ $(div).html( data ) });
Regards