Refresh parent page with tabs


<p>I'm using an page with 4 tabs. Those are labeled #tab1/#tab2/#tab3/#tab4. I have an edit function which opens a new window. If that window is closed through clicking submit or just closing it the parent window should be refreshed. Well this works now but it always refreshes the first tab. Could you tell me how to adjust my code so it only takes an specific tab?</p>

<pre class="lang-js prettyprint-override"><code>$(document).ready(function() {
    $("li").click(function(){
        $(this).toggleClass("active");
        $(this).next("div").stop('true','true').slideToggle("slow");
    });
});
window.onunload = refreshParent;
function refreshParent() {
    window.opener.location.reload();
}
</code></pre>
