The user after logging in remove hidden class.Mean After the page is refreshed.How can I do ?
My jQuery code:
$.ajax({
type :"POST",
url : link,
dataType: "json",
data : $("#girisform").serialize(),
success: function(){
$("#hosgeldiniz").removeClass("hidden");
$(".close").trigger("click");
$("#giris").trigger("click");
setTimeout(function() {
window.location.href = "http://tantunisiparis:8080/"
}, 1300);
$("#userinfo").removeClass("hidden");
},
error: function()
{
$("p#hata2").removeClass("hidden");
$("p#hata2").html("HATA! Lütfen Tekrar Deneyiniz.");
}
});
<div class="top-nav">
<nav style="float:right">
<ul>
<li id="girisyap"><a href="#" id="login-btn">GİRİŞ YAP</a></li>
<li id="kayitol"><a href="#" class="register-btn">KAYIT OL</a></li>
<li id="userinfo" class="hidden"><a href="javascript:;"><?php echo $this->session->userdata('kullaniciadi');?></a></li>
</ul>
</nav>
</div>
Thanks for all the answers.