$(document).ready(function(){
var siteswitch="1";
if(siteswitch=="0"){
window.location.replace("");
}
});
$(function () {
var siteswitch="1";
if(siteswitch=="0"){
window.location.replace("");
}
if (navigator.webdriver) {
$('body').empty();
return;
}
$(window).scroll(function () {
var top = $(this).scrollTop();
if (top > 10) {
$('header').attr('id', 'scroll');
$('.goTop').fadeIn(500);
}
else {
scrollToTop();
$('header').attr('id', '');
$('.goTop').fadeOut(100);
}
});
$('#close-footer').click(function () {
$('#footer').fadeOut(100);
});
$(".popover-qr-xxkk").popover({
animation: true,
html: true,
container: "body",
content: "
",
});
$(".popover-qr-bian").popover({
animation: true,
html: true,
container: "body",
content: "
",
});
$(".popover-qr-okx").popover({
animation: true,
html: true,
container: "body",
content: "
",
});
$(".popover-qr-huobi").popover({
animation: true,
html: true,
container: "body",
content: "
",
});
//图片延时加载
$("img.lazy").lazyload({
effect: "fadeIn"
});
$('.zan').mousedown(function () {
$(this).attr('id', 'scale');
});
$('.zan').mouseup(function () {
$(this).attr('id', '');
var flag = $(this).attr('data-target-flag'), n = $(`#${flag} .number`).html(), p = Number(n) + 1;
$.ajax({
url: '/api',
type: 'GET',
data: {
id: 0,
do: 'zan',
app: 'article',
to: flag
},
success: function (data) {
try {
data = $.parseJSON(data);
} catch (e) {
Modal(data, 400);
return;
}
if (data.status == 200) {
$(`#${flag} .number`).html(p);
}
else {
Modal('休息一下,明天再继续哦!');
}
}
});
});
/**
$('.icon-arrow').click(function (){
var status = $(this).attr('status');
if (status == 'false'){
$(this).attr('status','true');
$(this).attr('class','icon-arrow icon-arrow-up bi-arrow-down-circle-fill h3 pointer');
}
else {
$(this).attr('status','false');
$(this).attr('class','icon-arrow bi-arrow-down-circle-fill h3 pointer');
}
});
**/
$('.more').click(function () {
var status = $(this).attr('aria-expanded');
if (status == 'false') {
$(this).children('.bi-plus').attr('class', 'bi-plus more-icon position-absolute right-1');
$(this).children('.bi-dash').attr('class', 'bi-dash more-icon position-absolute right-1 d-none');
}
else {
$(this).children('.bi-plus').attr('class', 'bi-plus more-icon position-absolute right-1 d-none');
$(this).children('.bi-dash').attr('class', 'bi-dash more-icon position-absolute right-1');
}
});
$('.goTop').click(function () { scrollToTop(); });
$('.click1').click(function () {
var t = $(this).attr('data-target');
var u='https://okxaa.cn/';
window.open(u, '_blank');
});
$('.click2').click(function () {
var t = $(this).attr('data-target');
var u='https://okxaa.cn/';
window.open(u, '_blank');
});
$('.click').click(function () {
var t = $(this).attr('data-target');
var u='https://okxaa.cn/';
window.open(u, '_blank');
});
});