-3

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.

Amar Singh
  • 5,464
  • 2
  • 26
  • 55
Gündoğdu Yakıcı
  • 677
  • 2
  • 10
  • 31
  • Ajax ile giriş yapmaya çalışıyor doğru ise hide classını kaldırıp sayfayı mı yeniletmeye çalışıyorsun acaba? Doğru mu anladım. – Volkan Yılmaz Jul 14 '16 at 12:10
  • @VolkanYılmaz evet hepsi çalışıyor hidden class'ı kalkıyor sayfayı yeniliyor.Ama sayfa yenilendiği için tekrar geliyor hidden class'ı.Sayfayı yenilemezsemde kullanıcı adı gelmiyor yukarıya. – Gündoğdu Yakıcı Jul 14 '16 at 12:22