锘?*------------------- *Description: By www.yiwuku.com *Website: https://app.zblogcn.com/?auth=3ec7ee20-80f2-498a-a5dd-fda19b198194 *Author: 灏斾粖 erx@qq.com *update: 2019-12-12(Last:2019-12-10) -------------------*/ $(function() { //erx:Navbar var s = document.location; $(".erx-menu > li > a").each(function() { if (this.href == s.toString().split("#")[0]) { $(this).parent().addClass("cu"); return false; } }); $(".erx-menu > li:has('ul')").each(function() { $(this).children("a").append(""); }); $('.erx-mb-nav-ctrl').click(function(){ $(".erx-menu").toggleClass("active"); }); $(document).bind("click",function(e){ if($('.erx-mb-nav-ctrl').is(":visible") && !$(e.target).closest(".erx-mb-nav-ctrl").length && !$(e.target).closest(".erx-menu").length){ $(".erx-menu").removeClass("active"); } }); //Mobile var xyPwt = $(window).width(); $(window).resize(function(){ xyPwt=$(window).width(); erxEasyingMobileNav(); }); function erxEasyingMobileNav(){ if(xyPwt<=980){ $(".erx-menu>li:has(ul)").each(function(){ $(this).attr("data-minav", 0); }); }else{ $(".erx-menu>li:has(ul)").removeAttr("data-minav"); } } erxEasyingMobileNav(); $(".erx-menu > li:has('ul') > a").click(function(){ var minav = $(this).parent().attr("data-minav")*1; if(!minav){ $(this).parent().attr("data-minav", 1).siblings().attr("data-minav", 0); return false; } }); //erx:Gotop $(".erx-gotop").click(function(){ $("html, body").animate({ scrollTop: 0 },300); return false; }); var erxSctop = $(window).scrollTop(), erxSnum = 500; if(erxSctop > erxSnum){ $(".erx-back, .erx-gotop").addClass("active"); } $(window).scroll(function(){ erxSctop = $(window).scrollTop(); if(erxSctop > erxSnum){ $(".erx-back, .erx-gotop").addClass("active"); }else{ $(".erx-back, .erx-gotop").removeClass("active"); } }); }); if(window.console && window.console.log){ console.log('\n %c ZBlogPHP erx_Easying_p %c \u5c14\u4eca\u4f5c\u54c1 \n', 'color:#fff;background:#f80;padding:5px 0;', 'color:#fff;background:#333;padding:5px 0;'); console.log("%c \x68\x74\x74\x70\x73\x3a\x2f\x2f\x61\x70\x70\x2e\x7a\x62\x6c\x6f\x67\x63\x6e\x2e\x63\x6f\x6d\x2f\x3f\x69\x64\x3d\x32\x33\x30\x31", ""); } //erx:Comments zbp.plugin.unbind("comment.reply.start", "system"); zbp.plugin.on("comment.reply.start", "erx_Easying_p", function(i) { $("#inpRevID").val(i); var frm = $('#divCommentPost'), cancel = $("#cancel-reply"), temp = $('#temp-frm'); var div = document.createElement('div'); div.id = 'temp-frm'; div.style.display = 'none'; frm.before(div); $('#AjaxComment' + i).before(frm); frm.addClass("reply-frm"); cancel.show(); cancel.click(function() { $("#inpRevID").val(0); var temp = $('#temp-frm'), frm = $('#divCommentPost'); if (!temp.length || !frm.length) return; temp.before(frm); temp.remove(); $(this).hide(); frm.removeClass("reply-frm"); return false; }); try { $('#txaArticle').focus(); } catch (e) {} return false; }); zbp.plugin.on("comment.get", "erx_Easying_p", function(postid, page) { $('span.commentspage').html("Waiting..."); }); zbp.plugin.on("comment.got", "erx_Easying_p", function(formData, data, textStatus, jqXhr) { $('#AjaxCommentBegin').nextUntil('#AjaxCommentEnd').remove(); $('#AjaxCommentEnd').before(data); $("#cancel-reply").click(); }); zbp.plugin.on("comment.post.success", "erx_Easying_p", function () { $("#cancel-reply").click(); }); //浠ヤ笂浠g爜宸插仛楂樻晥鍜岀簿绠€澶勭悊锛岄粯璁ゆ棤浠讳綍閿欒锛岃嫢鏃犲崄瓒虫妸鎻″垏鍕挎搮鑷慨鏀癸紝浠ュ厤鍑洪敊锛侊紙灏斾粖 erx@qq.com锛 //https://app.zblogcn.com/?auth=3ec7ee20-80f2-498a-a5dd-fda19b198194