i'm having a JQuery tab on my page and currently when i reload or run some serverside codes , the tab would go back to the first one, is there a way to make the tabs stay? I would like my tab to stay on the current selected tab rather than go back to the first tab when the page reloads
My JQuery:
$(function () {
var tabContainers = $('div.tabs > div');
$('div.tabs ul.tabNavigation a').click(function () {
tabContainers.hide();
tabContainers.filter(this.hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
$(this).addClass('selected');
return false;
}).filter(':first').click();
});
My tabs:
<div class="tabs">
<ul class="tabNavigation">
<li><a href="#Annoucments">Annoucments</a></li>
<li><a href="#Events">Events</a></li>
<li><a href="#Photos">Photos</a></li>
<li><a href="#JobOpportunities">Job Opportunities</a></li>
<li><a href="#Contacts">Contacts</a></li>
<li><a href="#Videos">Videos</a></li>
</ul>
<div id="Annoucments" class="ContentDIV">
..
</div>
<div id="Events" class="ContentDIV">
..
</div>
<div id="Photos" class="ContentDIV">
..
</div>
<div id="JobOpportunities" class="ContentDIV">
..
</div>
<div id="Contacts" class="ContentDIV">
...
</div>
<div id="Videos" class="ContentDIV">
..
</div>
</div>