fix: nav
This commit is contained in:
@@ -71,6 +71,42 @@ $(document).ready(function (e) {
|
||||
$(this).attr('href', $(this).attr('href')+hash);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//无刷新切换状态
|
||||
$('.switch').on("click",".fa-toggle-on",function(){
|
||||
$.get($(this).parent(".switch").attr("href"))
|
||||
$(this).addClass("fa-toggle-off");
|
||||
$(this).removeClass("fa-toggle-on");
|
||||
return false;
|
||||
})
|
||||
$('.switch').on("click",".fa-toggle-off",function(){
|
||||
$.get($(this).parent(".switch").attr("href"))
|
||||
$(this).addClass("fa-toggle-on");
|
||||
$(this).removeClass("fa-toggle-off");
|
||||
return false;
|
||||
})
|
||||
|
||||
$('.ajaxlink').on("click",function(){
|
||||
var url=$(this).attr("href");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
data: {},
|
||||
success: function (response, status) {
|
||||
alert(response.data);
|
||||
if(response.tourl!=""){
|
||||
location.href=response.tourl;
|
||||
}
|
||||
},
|
||||
error:function(xhr,status,error){
|
||||
alert('返回数据异常!');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user