//鍔ㄧ敾 var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: true, live: true }); wow.init(); //nav $(function(){ //瓒呰繃涓€瀹氶珮搴﹀鑸坊鍔犵被鍚 var nav=$("nav"); //寰楀埌瀵艰埅瀵硅薄 var win=$(window); //寰楀埌绐楀彛瀵硅薄 var sc=$(document);//寰楀埌document鏂囨。瀵硅薄銆 //绉诲姩绔睍寮€nav $('#navToggle').on('click',function(){ $('.m_nav').addClass('open'); }) //鍏抽棴nav $('.m_nav .closed').on('click',function(){ $('.m_nav').removeClass('open'); }) //浜岀骇瀵艰埅 绉诲姩绔 $(".m_nav .ul li").click(function() { $(this).children("div.dropdown_menu").slideToggle('slow') $(this).siblings('li').children('.dropdown_menu').slideUp('slow'); }); }) var urlstr = location.href; var urlstatus=false; $(".main-menu a").each(function () { if ((urlstr + '/').indexOf($(this).attr('href')) > -1&&$(this).attr('href')!='') { $(this).addClass('active'); urlstatus = true; } else { $(this).removeClass('active'); } }); if (!urlstatus) {$(".main-menu a").eq(0).addClass('active'); } var urlstr = location.href; var urlstatus=false; $(".page-nav-ul a").each(function () { if ((urlstr + '/').indexOf($(this).attr('href')) > -1&&$(this).attr('href')!='') { $(this).addClass('cur'); urlstatus = true; } else { $(this).removeClass('cur'); } }); if (!urlstatus) {$(".page-nav-ul a").eq(0).addClass('cur'); } var urlstr = location.href; var urlstatus=false; $(".nav-list a").each(function () { if ((urlstr + '/').indexOf($(this).attr('href')) > -1&&$(this).attr('href')!='') { $(this).addClass('cur'); urlstatus = true; } else { $(this).removeClass('cur'); } }); if (!urlstatus) {$(".nav-list a").eq(0).addClass('cur'); } //鍥炲埌椤甸潰 function gotoTop(acceleration,stime) { acceleration = acceleration || 0.1; stime = stime || 10; var x1 = 0; var y1 = 0; var x2 = 0; var y2 = 0; var x3 = 0; var y3 = 0; if (document.documentElement) { x1 = document.documentElement.scrollLeft || 0; y1 = document.documentElement.scrollTop || 0; } if (document.body) { x2 = document.body.scrollLeft || 0; y2 = document.body.scrollTop || 0; } var x3 = window.scrollX || 0; var y3 = window.scrollY || 0; // 婊氬姩鏉″埌椤甸潰椤堕儴鐨勬按骞宠窛绂 var x = Math.max(x1, Math.max(x2, x3)); // 婊氬姩鏉″埌椤甸潰椤堕儴鐨勫瀭鐩磋窛绂 var y = Math.max(y1, Math.max(y2, y3)); // 婊氬姩璺濈 = 鐩墠璺濈 / 閫熷害, 鍥犱负璺濈鍘熸潵瓒婂皬, 閫熷害鏄ぇ浜 1 鐨勬暟, 鎵€浠ユ粴鍔ㄨ窛绂讳細瓒婃潵瓒婂皬 var speeding = 1 + acceleration; window.scrollTo(Math.floor(x / speeding), Math.floor(y / speeding)); // 濡傛灉璺濈涓嶄负闆? 缁х画璋冪敤鍑芥暟 if(x > 0 || y > 0) { var run = "gotoTop(" + acceleration + ", " + stime + ")"; window.setTimeout(run, stime); } } $(function () { $("[data-toggle='popover']").popover({html : true, trigger: 'hover', container: 'body'}); });