After closing div refresh another div
<p>I am using js function to hide div</p>

<pre><code>&lt;div class="alert alert-success" id="closediv"&gt;You have deleted an item!&lt;/div&gt;

&lt;script&gt;
setTimeout(function() {
    $('#closediv').fadeOut('slow');
    }, 5000
);
&lt;/script&gt;
</code></pre>

<p>I am using this function to close information that prints in a div. Once the information is closed, I would like to refresh another div or whole page</p>

<p>Div I want to refresh is   </p>

<pre><code>&lt;script&gt;
    setTimeout(function() {
       $('#closediv').fadeOut('slow');
       }, 5000
       $('#mainContent').location.reload();
       );                   
    }
&lt;/script&gt;
</code></pre>

<p>Script does not work once I added to refresh div: Any help is appreciated, I need to close div first then refresh another div. </p>