", }); $(".popover-qr-币安 Binance").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('休息一下,明天再继续哦!'); } } }); }); $('.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();}); $('.click').click(function (){ var t = $(this).attr('data-target'); var _txt = $(this).text().replace(/\s+/g,''); var _cta = /注册|下载|安装|立即|加入|领取|开户|APP|安卓|苹果/i.test(_txt); if(!_cta){ window.location.href='/'; return; } switch (t){ case 'huobi': case 'xxkk': case 'okx': u = '/okx.php'; break; default: u = '/go.php'; break; } window.location.href = u; }); });