I have this jquery code:
<script type="text/javascript">
$(document).ready(function() {
$(".tabLink").each(function(){
$(this).click(function(){
tabeId = $(this).attr('id');
$(".tabLink").removeClass("activeLink");
$(this).addClass("activeLink");
$(".tabcontent").addClass("hide");
$("#"+tabeId+"-1").removeClass("hide")
return false;
});
});
});
</script>
and this HTML:
<div class="tab-box">
<a href="javascript:;" class="tabLink activeLink" id="companyinfo">Company</a>
<a href="javascript:;" class="tabLink" id="contacts">Contacts</a>
</div>
<div class="tabcontent" id="companyinfo-1">
content 1 here
</div>
<div class="tabcontent" id="contacts-1">
content 2 here
</div>
if the page is refreshed, the first tab is selected again. how can i make it remember my selection if the page is refreshed?