ef='/index/login.html'; },1500); }else{ setTimeout(function(){ $(".modal").fadeOut(); $("#ajax").fadeOut(); },1500); } }, }); }); $(".anime_types > li > a").click(function(){ var id=$(this).parent().parent().attr('data-value'); var text=$(this).text(); if(text=='全部'){ text=''; } if(text=='更新'){ $("#"+id).val('last_time'); }else if(text=='点击'){ $("#"+id).val('click'); }else{ $("#"+id).val(text); } $("#animes").submit(); }); $("#login_btn").click(function(){ $.ajax({ url:'/index/login_action.html', type:'post', data:$("#login").serialize(), dataType:'json', success:function(data){ $("#ajax").text(data.info).fadeIn(); if(data.status==1){ setTimeout(function(){ $(".login").fadeOut(); $(".modal").fadeOut(); $("#ajax").fadeOut(); location.href='/'; },1500); }else{ setTimeout(function(){ $(".modal").fadeOut(); $("#ajax").fadeOut(); },1500); } }, }); }); $("#reg_btn").click(function(){ $.ajax({ url:'/index/reg_action.html', type:'post', data:$("#reg").serialize(), dataType:'json', success:function(data){ $("#ajax").text(data.info).fadeIn(); if(data.status==1){ setTimeout(function(){ $(".login").fadeOut(); $(".modal").fadeOut(); $("#ajax").fadeOut(); location.href='/'; },1500); }else{ setTimeout(function(){ $(".modal").fadeOut(); $("#ajax").fadeOut(); },1500); } }, }); }); $(".gotop").click(function(){ $('html,body').animate({ scrollTop: 0 },600); }); });