jQuery(function($){ //鍒ゆ柇鏄惁涓篿e娴忚鍣 // if($.browser.msie) { // $(".t3-megamenu .nav li.dropdown.mega:first-child .dropdown-menu .mega-nav").css("width", "97%"); // } $(".global-button").click(function(){ $(".language-switch").slideDown(); $("#t3-header").addClass("cengji"); }); $(".language-close").click(function(){ $(".language-switch").slideUp(); $("#t3-header").removeClass("cengji"); }); //杩斿洖椤堕儴鎸夐挳涓嶉伄浣忛〉鑴 $(window).scroll(function () { var scrollTop1 = $(window).scrollTop(); //鍗抽〉闈㈠悜涓婃粴鍔ㄧ殑璺濈 var windowHeight1 = $(window).height(); // 娴忚鍣ㄨ嚜韬殑楂樺害 var offsetHeight1 = offsetTop1 - scrollTop1 - 70; var distanceY = window.pageYOffset || document.documentElement.scrollTop; var shrinkOn = 100; var width = $(window).width(); if(width>1024){ var offsetTop1 = $("#footer").offset().top; //鐩爣鍏冪礌鐩稿浜巇ocument椤堕儴鐨勪綅缃 } else{ var offsetTop1 = $(".m-footer").offset().top; //鐩爣鍏冪礌鐩稿浜巇ocument椤堕儴鐨勪綅缃 } if (distanceY > shrinkOn) { $("#toTop1").show(); } else{ $("#toTop1").hide(); } if (offsetTop1 < (scrollTop1 + windowHeight1)) { //鍦?涓复鐣岀姸鎬佷箣闂寸殑灏变负鍑虹幇鍦ㄨ閲庝腑鐨 var footerheightpc = $("#footer").innerHeight() + 10; var footerheightm = $(".m-footer").innerHeight() + 10; if(width>1024){ $("#toTop1").css({"position":"absolute","bottom":footerheightpc}); $("#floating-frame").css({"position":"absolute","bottom":footerheightpc+70}); } else{ $("#toTop1").css({"position":"absolute","bottom":footerheightm}); $("#floating-frame").css({"position":"absolute","bottom":footerheightm+50}); } } else{ $("#toTop1").css({"position":"fixed","bottom":"10px"}); if(width>1024){ $("#floating-frame").css({"position":"fixed","bottom":"80px"}); }else{ $("#floating-frame").css({"position":"fixed","bottom":"60px"}); } } }); $('#toTop1').click(function(){ $('html,body').animate({scrollTop: '0px'}, 800); }); //绉诲姩绔悳绱㈡ $("input#mod-search-searchword").attr("placeholder",""); $(".form-inline .button").attr("src","https://file.jingdiao.com/website/jingdiao/cn/images/common/search1.svg"); $(".form-inline .button").hover(function(){ $(this).attr("src","https://file.jingdiao.com/website/jingdiao/cn/images/common/search2.svg"); },function(){ $(this).attr("src","https://file.jingdiao.com/website/jingdiao/cn/images/common/search1.svg"); }); //PC绔 //娣诲姞logo // $("#t3-mainnav").before(""); $("#t3-mainnav").before(""); // $("#t3-mainnav").before(""); //鎼滅储鏍忓睍寮€/鎶樺彔 $(".search-button").click(function(){ $(".search,.close-button").slideDown(150); $("#t3-header").css("z-index","25"); $("#search-input").focus(); }); $(".close-button").click(function(){ $(".head-search .search,.close-button").slideUp(150); $("#t3-header").css("z-index","15"); }); //涓嬫媺鑿滃崟灞曞紑鏃跺嚭鐜伴伄缃╁眰 $("li.dropdown.mega").hover(function(){ $(".common-mask").css({"z-index":"1","opacity":"0.7"}); },function(){ $(".common-mask").css({"z-index":"-1","opacity":"0"}); }); //椤堕儴闅忓睆骞曟粴鍔ㄥ彉鍖 window.addEventListener('scroll', function(e){ var distanceY = window.pageYOffset || document.documentElement.scrollTop, shrinkOn = 300, wrapper = $(".t3-wrapper"); if (distanceY > shrinkOn) { wrapper.addClass("smaller"); } else { if (wrapper.hasClass("smaller")) { wrapper.removeClass("smaller"); } } }); //娣诲姞浜屼笁绾ц彍鍗 //绮鹃洉鏈 // $("li.dropdown.mega:nth-child(1) li:nth-child(2) a").after("
"); // $("li.dropdown.mega:nth-child(1) li:nth-child(3) a").after(" "); $("li.dropdown.mega:nth-child(1) li:nth-child(2) a").after(" "); $("li.dropdown.mega:nth-child(1) li:nth-child(3) a").after(" "); // $("li.dropdown.mega:nth-child(1) li:nth-child(2) a").after(" "); // $("li.dropdown.mega:nth-child(1) li:nth-child(3) a").after(" "); //鍏充簬鎴戜滑 // $("li.dropdown.mega:last-child li:nth-child(2) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(3) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(4) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(5) a").after(" "); $("li.dropdown.mega:last-child li:nth-child(2) a").after(" "); $("li.dropdown.mega:last-child li:nth-child(3) a").after(" "); $("li.dropdown.mega:last-child li:nth-child(4) a").after(" "); $("li.dropdown.mega:last-child li:nth-child(5) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(2) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(3) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(4) a").after(" "); // $("li.dropdown.mega:last-child li:nth-child(5) a").after(" "); //浜у搧涓庢妧鏈 // $("li.dropdown.mega:nth-child(2) li:nth-child(2) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(3) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(4) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(5) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(6) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(2) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(3) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(4) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(5) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(6) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(2) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(3) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(4) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(5) a").after(" "); // $("li.dropdown.mega:nth-child(2) li:nth-child(6) a").after(" "); // cgx 0813 涓嬫媺鑿滃崟瀹藉害 // $(window).resize(function() { // var width = $("body").css("width"); // $(".nav-child.dropdown-menu.mega-dropdown-menu").css({"width":width,"left":"0"}); // }); //涓€绾ц彍鍗曠偣鍑昏烦杞 // $(".dropdown.mega:first-child").click(function(){ // window.location.href="/cnjd/machines/home"; // }); //// $(".dropdown.mega:nth-child(2)").click(function(){ //// window.location.href="/cnjd/product-technology/home"; //// }); // $(".dropdown.mega:nth-child(2)").click(function(){ // window.location.href="/cnjd/industries/home"; // }); // $(".dropdown.mega:nth-child(3)").click(function(){ // window.location.href="/cnjd/service/home"; // }); // $(".dropdown.mega:nth-child(4)").click(function(){ // window.location.href="/cnjd/news-media/home"; // }); // $(".dropdown.mega:nth-child(5)").click(function(){ // window.location.href="/cnjd/about-us/home"; // }); $(".dropdown.mega:first-child").click(function(){ window.location.href="/machines/home"; }); // $(".dropdown.mega:nth-child(2)").click(function(){ // window.location.href="/product-technology/home"; // }); $(".dropdown.mega:nth-child(2)").click(function(){ window.location.href="/industries/home"; }); $(".dropdown.mega:nth-child(3)").click(function(){ window.location.href="/service/home"; }); $(".dropdown.mega:nth-child(4)").click(function(){ window.location.href="/news-media/home"; }); $(".dropdown.mega:nth-child(5)").click(function(){ window.location.href="/about-us/home"; }); // $(".dropdown.mega:first-child").click(function(){ // window.location.href="/ceshiceshi/machines/home"; // }); //// $(".dropdown.mega:nth-child(2)").click(function(){ //// window.location.href="/ceshiceshi/product-technology/home"; //// }); // $(".dropdown.mega:nth-child(2)").click(function(){ // window.location.href="/ceshiceshi/industries/home"; // }); // $(".dropdown.mega:nth-child(3)").click(function(){ // window.location.href="/ceshiceshi/service/home"; // }); // $(".dropdown.mega:nth-child(4)").click(function(){ // window.location.href="/ceshiceshi/news-media/home"; // }); // $(".dropdown.mega:nth-child(5)").click(function(){ // window.location.href="/ceshiceshi/about-us/home"; // }); //绉诲姩绔 //椤堕儴娣诲姞logo // $("div.navbar-header").append(""); $("div.navbar-header").append(""); // $("div.navbar-header").append(""); //椤堕儴娣诲姞璇█鍒囨崲鍣 $("div.navbar-header").append(""); $("div.navbar-header").after(""); //鐐瑰嚮鍦扮悆锛岃瑷€杞崲鍣ㄥ睍寮€銆佹姌鍙 $("span.global-m").click(function(){ if($(".language-switch-m").css("display")=="none"){ $("body").addClass("global-open"); $(".global-open .t3-wrapper").click(function(){ if(!($(".machine-video-area").css("display")=="block")){ $("body").removeClass("global-open"); } $(".language-switch-m").slideUp(200); }) $("#t3-mainnav").click(function(e){ e.stopPropagation(); }) $("body").removeClass("off-canvas-effect-4 off-canvas-left off-canvas-open"); } else{ if(!($(".machine-video-area").css("display")=="block")){ $("body").removeClass("global-open"); } } $(".language-switch-m").slideToggle(200); }) //cyt 渚ф粦瀵艰埅鏍 // $("#Mod97").after("鏈哄簥閫夊瀷"); $("#Mod97").after("鏈哄簥閫夊瀷"); // $("#Mod97").after("鏈哄簥閫夊瀷"); $("span.nav-header").click(function(){ $(this).siblings("span.nav-header~.dropdown-menu").addClass("dropdown-menu-open"); $(this).siblings("span.nav-header~.dropdown-menu").children(".close-menu").remove(); $(this).siblings(".dropdown-menu-open").prepend("