$(document).ready(function(){ $(window).scroll(function(){ var _offtop = $(this).scrollTop(); // console.log(_offtop); if(_offtop > 50) { $(".sm_head").addClass("fixed"); $("section#page-nav").addClass("navfixed"); }else { $(".sm_head").removeClass("fixed"); $("section#page-nav").removeClass("navfixed"); } // if(_offtop > 50) { // var _h = $(".cp-list").height(); // $(".cp-list").addClass("fixed"); // $(".cp-list2").show().css("height",_h +"px"); // }else{ // $(".cp-list").removeClass("fixed"); // $(".cp-list2").hide(); // } }); var rr = true; $(".dot").click(function(){ if ( rr ) { rr = false; $(this).addClass("ac_close"); $(".sm_body").slideDown(); }else { rr = true; $(this).removeClass("ac_close"); $(".sm_body").slideUp(); } }); $(".share a.wx").mouseenter(function(){ $(this).parent().addClass("ft_show"); }); $(".share a.wx").mouseleave(function(){ $(this).parent().removeClass("ft_show"); }); $("input.skey , input.search_all").focus(function(){ $(this).attr("placeholder",""); }); $("input.skey , input.search_all").blur(function(){ $(this).attr("placeholder","璇疯緭鍏ヤ骇鍝佸悕銆佽缁嗘弿杩般€佸皝瑁?); }); // 棣栭〉鎼滅储 if( $(".home_search").length > 0) { $(".t-head p").click(function(){ var _index = $(this).index(); $(this).addClass("thead_show").siblings().removeClass("thead_show"); $(".t-body .items").eq(_index).show().addClass("tbody_show").siblings().removeClass("tbody_show").hide(); }); } // 鍏ㄥ眬鎼滅储鏍 $(".site_form .btn_search").click(function(){ var searchKey = $("input.skey").val(); var quanju = {}; quanju["searchAll"] = searchKey; console.log(quanju); }); // 棣栭〉鎼滅储 $(document).on("click" , ".tbody_show button.search_all", function(){ var searchKey = $("input.search_all").val(); var shouye = {}; shouye["searchHome"] = searchKey; console.log(shouye); }) // 鎵嬫満绔彍鍗曞鑸 var k = true; $(".elementor-menu-toggle").click(function(){ if(k== true) { k=false $(this).addClass("elementor-active"); $(this).attr("aria-expanded",true); }else { k = true; $(this).removeClass("elementor-active"); $(this).attr("aria-expanded",false); } } ) // 绛涢€夐潰鏉夸笅鐨勬寜閽?鏀惰捣闈㈡澘 var f = true; $(".click-hide p").click(function(){ if( f) { f= false; $(".cp-box").addClass("hidetoleft"); }else { $(".cp-box").removeClass("hidetoleft"); f = true; } }); var _thisWidth = $(window).width(); if ( _thisWidth == 1024 ) { $(".click-hide p").click(); } if (_thisWidth < 800 ) { $(".cp-parameter h4").click(function(){ $(".cp-parameterlist p em").click(); }); } });