I have created this function in JQuery:
function OpenPage(pagename) {
var page = pagename
$('#LoadingDiv').show();
$('.tabcontent').load(page);
$("html, body").animate({ scrollTop: 0 }, "slow");
window.onload = function () {
$('#LoadingDiv').hide();
}
}
it loads the selected page into a DIV using .load
before loading the page, its shows a div with a loading bar image, how can i hide this loading div once the page using .load has finished loading
i added window.onload at the end of my function but its not hiding the div