$(".pc-bocweb-header3 .search-btn,.m-bocweb-header3 .header2 .search-btn").on("click",function(){ $(".bocweb-header3 .warp-search-form").stop().slideDown(300); $(".bocweb-header3 .dxnav__dropdown-overlay").addClass("overlay--open"); }) $(".search-form .search-close,.dxnav__dropdown-overlay").on("click",function(){ $(".warp-search-form").stop().slideUp(300); $(".dxnav__dropdown-overlay").removeClass("overlay--open"); if (!$("body").hasClass(".header-por")) { } }) function scrollno(){ $(window).scroll(function(){ var before = $(window).scrollTop(); $(window).scroll(function() { var after = $(window).scrollTop(); if (before1024&&before>0) { $('header').addClass('headroom-unpinned'); before = after; if(after > 20){ $('.pc-bocweb-header3').addClass('down'); }else{ $('.pc-bocweb-header3').removeClass('down'); } }; if (before>after&&window.innerWidth>1024) { if(after > 20){ $('.pc-bocweb-header3').addClass('down'); }else{ $('.pc-bocweb-header3').removeClass('down'); } $('.pc-bocweb-header3').removeClass('headroom-unpinned'); before = after; }; }) }) } function navScroll(ele,select){ var winS = $(window).scrollTop(); var navTop = ele.offset().top; console.log(navTop) if(winS>navTop){ ele.addClass('on'); }else{ ele.removeClass('on'); } $(window).on('scroll resize',function(){ winS = $(window).scrollTop(); if(winS>navTop){ ele.addClass('on'); }else{ ele.removeClass('on'); } // var _length = $('.position').length; // for(var i = 0;i < _length ; i++){ // if($(window).scrollTop()>=$('.position').eq(i).offset().top){ // select.removeClass('cur'); // select.eq(i).addClass('cur') // } // } // if ($(document).scrollTop() >= $(document).height() - $(window).height()) { // select.removeClass('cur'); // select.last().addClass('cur'); // } }); // select.on('click',function(){ // var i = $(this).index(); // $('html,body').stop().animate({scrollTop:$('.position').eq(i).offset().top-ele.outerHeight()+2},500); // }) } var userAgent = navigator.userAgent; //闂佸憡鐟﹂悧鏇犳閸楃伝纭呯疀濮樺吋缍岄梺闈╃祷閸斿骸鈻撻幉濉籩rAgent闁诲孩绋掗〃鍫ヮ敄娴e湱鈻旈柨鐕傛嫹 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //闂佸憡甯囬崐鏍蓟閸ヮ剙鍙婃い鏍ㄧ閸庡E<11濠电偞娼欑换妤咃綖瀹ュ闂柨鐕傛嫹 var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //闂佸憡甯囬崐鏍蓟閸ヮ剙鍙婃い鏍ㄧ閸庡E闂佹眹鍔岄崵鎭塯e濠电偞娼欑换妤咃綖瀹ュ闂柨鐕傛嫹 var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; if(isIE) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if(fIEVersion == 7) { //return 7; } else if(fIEVersion == 8) { //return 8; } else if(fIEVersion == 9) { //return 9; } else if(fIEVersion == 10) { //return 10; } else { //return 6;//IE闂佺粯顨呴悧濠傦耿閿燂拷<=7 } } else if(isEdge) { //return 'edge';//edge } else if(isIE11) { //return 11; //IE11 }else{ $(window).scroll(function(){ var windowTop=jQuery(window).scrollTop(); var windowTop2=jQuery(window).scrollTop()/4; if (windowTop >=0) { jQuery('.nybanner .bg').css('transform',"translate(0px,"+(windowTop) / 1.5+"px) scale("+(1+(windowTop2) / $(window).height())+");"); }; }); } function scrollAnimation(ele) { $(ele).each(function() { var _this = $(this); if (_this.offset().top > $(window).scrollTop() + $(window).height() || _this.offset().top < $(window).scrollTop() - _this.outerHeight()) { } else if ($(window).scrollTop() >= _this.offset().top - $(window).height() * 0.92) { _this.addClass('animate'); } }); $(window).scroll(function(){ $(ele).each(function() { var _this = $(this); if (_this.offset().top > $(window).scrollTop() + $(window).height() || _this.offset().top < $(window).scrollTop() - _this.outerHeight()) { } else if ($(window).scrollTop() >= _this.offset().top - $(window).height() * 0.92) { _this.addClass('animate'); } }); }); } $(function(){ if(window.innerWidth>1024){ new WOW().init(); var parallaxBox = document.getElementsByClassName('teasers-con'); for (var i = 0; i < parallaxBox.length; i++) { new Parallax(parallaxBox[i]); } } }); // 銆€銆€var type = navigator.appName; // 銆€銆€if (type == "Netscape"){ // 銆€銆€var lang = navigator.language;//鑾峰彇娴忚鍣ㄩ厤缃瑷€锛屾敮鎸侀潪IE娴忚鍣 // 銆€銆€}else{ // 銆€銆€var lang = navigator.userLanguage;//鑾峰彇娴忚鍣ㄩ厤缃瑷€锛屾敮鎸両E5+ == navigator.systemLanguage // 銆€銆€}; // 銆€銆€var lang = lang.substr(0, 2);//鑾峰彇娴忚鍣ㄩ厤缃瑷€鍓嶄袱浣 // 銆€銆€if (lang == "zh"){ // 銆€銆€ window.location.replace('http://www.supcon.com/'); // 銆€銆€ //window.location.replace('url');//涓枃缂栫爜鏃舵墦寮€閾炬帴 // 銆€銆€}else if (lang == "en"){ // 銆€銆€ window.location.replace('http://global.supcon.com/index.php/contact.html'); // 銆€銆€}else{//鍏朵粬璇█缂栫爜鏃舵墦寮€浠ヤ笅閾炬帴 // // 銆€銆€ window.location.replace('url'); // 銆€銆€};