I have a page with some tabs that load content through the .load feature, I would like that after returning to this page the last tab clicked will continue marked and the content called via load will continue the same. How can I do this?
Applied code example:
jQuery("containerAbas span").click(function({
jQuery(this).removeClass("abaInativa").addClass("abaAtiva").siblings("span").addClass("abaInativa");
jQuery("#carregar").css("display","none").fadeIn("slow").load("pagina.html")
});
.abaAtiva{
margin:0 0.5% 0 0;
padding:10px 1% 0 1%;
height:35px;
background:#ff5800;
float:left;
color:#fff;
}
.abaInativa{
margin:0 0.5% 0 0;
padding:10px 1% 0 1%;
height:35px;
background:#c6c5c5;
color:#333;
float:left;
}
<div class="containerAbas">
<span id="aba1" class="abaAtiva">item 1</span>
<span id="aba2" class="abaInativa">item 2</span>
</div>