Question: 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?

Answer: 
You're using jQuery. Start writing [unobtrusive JavaScript](http://en.wikipedia.org/wiki/Unobtrusive_JavaScript).

### HTML

```
<body>
    <div id="content">
        <div id="chart"></div>
    </div>
</body>

```

### JavaScript

```
$(function () // on document ready,
{
    showLogoAndMenu();
    displayChart();
    // hideLogoAndMenu(); ?
});

```
```
<body onload="setTimeout(chart,100);">

```