I wish to show my webpage logo and menu before adding a chart that takes a while to load.
I used the onload event to call the chart (Highcharts used), unfortunately the browser seems to wait until the chart is ready to load before showing anything.
Html:
<body onload="chart();">
<div id="content"></div>
</body>
Javascript:
var chart = "<div id='chart'></div>";
function chart() {
$("#content").html(chart);
displayChart ();
}
How can I manage to first show logo and menu, and then the Highcharts?
You’re using jQuery. Start writing unobtrusive JavaScript.
HTML
JavaScript