$(function() { //置顶图标显示 $('#top-back').hide() $(window).scroll(function(){ if($(this).scrollTop() > 350){ $("#top-back").fadeIn(); } else{ $("#top-back").fadeOut(); } }) $('#wapwx').click(function(){ $('#wechat-lightbox').show(); const range = document.createRange(); range.selectNode(document.getElementById('wap-qq')); }) $('.guanbi').click(function(){ $('#wechat-lightbox').hide(); }) }) function copyUrl2(){ var Url2=document.getElementById("wap-qq").innerText; var oInput = document.createElement('input'); oInput.value = Url2; document.body.appendChild(oInput); oInput.select(); // 选择对象 document.execCommand("Copy"); // 执行浏览器复制命令 oInput.className = 'oInput'; oInput.style.display='none'; // window.location.href="xfjyjo://"; } //置顶事件 function topBack(){ $('body,html').animate({scrollTop:0},300); } $('.cndns-right .cndns-right-btn:first').css({border:"none"}); $(window).scroll(function () { if ($(this).scrollTop() > 500) { $(".scroll-to-top").fadeIn(400); } else { $(".scroll-to-top").fadeOut(400); } }); $(".scroll-to-top").on('click', function (event) { event.preventDefault(); $("html, body").animate({scrollTop: 0}, 600); });