$(function () { wowInt(); findTel(); phoneTargetSelf(); $(window).resize(); $(".foot_re .ewm_top li").hover(function(){ $(this).addClass("on").siblings().removeClass("on"); $(".ewm_img li").eq($(this).index()).addClass("on").siblings().removeClass("on"); },function(){ }) setTimeout(function () { $('.common-loading').hide() },1000) search(); nav(); ScollText(".pub_message_form"); $(".site_a03").click(function(){ $(".message_blank,.pub_message").fadeIn(); }) $(".message_close").click(function(){ $(".message_blank,.pub_message").fadeOut(); }) $(".site ul li").hover(function(){ $(this).addClass("cur").siblings().removeClass("cur"); },function(){ $(".site ul li").removeClass("cur"); }) // $(".site ul li").click(function(e){ // e.preventDefault(); // e.stopPropagation(); // $(this).toggleClass("cur").siblings().removeClass("cur"); // }) // $(document).click(function(){ // $(".site ul li").removeClass("cur"); // }) $(".menu-pc").click(function () { $(this).siblings(".pc_nav").toggleClass("on") }) }) function wowDelay(box,row,delayTime){ $(box).children().each(function(index){ for(var i = 0;i 0) { $('body').addClass('scrollHeader'); } else { $('body').removeClass('scrollHeader'); } }); if($(window).width()>1024){ $(".nav li").hover(function(e){ e.stopPropagation() $(this).find(".nav_list").stop().fadeIn(); $(this).siblings().find(".nav_list").stop().fadeOut() $(".nav").css("zIndex",3) },function(e){ e.stopPropagation() $(this).find(".nav_list").stop().fadeOut() $(".nav").css("zIndex",1) }) $(".nav_list").hover(function (e) { e.stopPropagation() },function (e) { e.stopPropagation() $(this).stop().fadeOut() }) }else{ $(".menu_button").click(function(){ $(this).toggleClass("visible_nav"); $("body").toggleClass("navbody"); // $(".nav>ul>li").removeClass("cur"); }) // $(".nav").on('touchmove',function(event){ // event.preventDefault(); // event.stopPropagation(); // }) // $(document).on("click",".nav_arrow",function(){ // $(this).parent("li").toggleClass("cur"); // $(this).parent("li").siblings().removeClass("cur"); // $(this).siblings(".nav_list").stop().slideToggle(); // $(this).parent("li").siblings().find(".nav_list").stop().slideUp(); // }) } //if($(window).width()<1024 && $(window).width()>767){ // $(document).on("click",".nav_arrow",function(){ // $(this).parent("li").toggleClass("cur"); // $(this).parent("li").siblings().removeClass("cur"); // $(this).siblings(".nav_list").stop().slideToggle(); // $(this).parent("li").siblings().find(".nav_list").stop().slideUp(); // }) //} if($(window).width()<1024){ $(document).on("click",".phoneClick",function(){ $(this).parent("li").toggleClass("cur"); $(this).parent("li").siblings().removeClass("cur"); $(this).siblings(".nav_list").stop().slideToggle(); $(this).parent("li").siblings().find(".nav_list").stop().slideUp(); }) } // $(".nav_arrow").click(function(){ // $(this).parent("li").toggleClass("cur"); // $(this).parent("li").siblings().removeClass("cur"); // $(this).siblings(".nav_list").stop().slideToggle(); // $(this).parent("li").find(".nav_list").stop().slideUp(); // }) // $(".return_a").click(function(){ // $(this).parents("li").removeClass("cur"); // }) } function search(){ $(".search span").click(function(e){ e.preventDefault(); e.stopPropagation(); $(".search").toggleClass("cur"); }) $(".search_box").click(function(e){ e.preventDefault(); e.stopPropagation(); }) $(document).click(function(){ $(".search").removeClass("cur"); }) } function wowInt(){ if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 100, mobile: false, live: true }); wow.init(); }; } function ScollText(obj){ if($(obj).length>0){ $(obj).mCustomScrollbar({ mouseWheelPixels:500, autoDraggerLength:false, advanced: { autoScrollOnFocus: "" } }); } } /*鎵嬫満绔摼鎺ユ敼涓烘湰绐楀彛鎵撳紑*/ function phoneTargetSelf(context){ if ($(window).width()<1024) { if(context==undefined){ context=$(document); } $('a',context).each(function(){ var target=$(this); var link=target.attr('target'); target.attr('target','_self'); }) } } /*鐢佃瘽閾炬帴鍙栨秷榛樿浜嬩欢骞舵坊鍔犳牱寮?/ function findTel(context){ if ($(window).width()>1024) { var condition = /^tel\:([0-9\-]+)|tel\:\+([0-9\-]+)$/; if(context==undefined){ context=$(document); } $('a',context).each(function(index, el) { var target=$(this); var href=target.attr('href'); if (condition.test(href)) { target.addClass('tel_link'); target.on('click',function(event){ event.preventDefault(); }) } }); } } /*ie9鐨刾laceholder鍖呭惈瀵嗙爜妗嗙殑鍏煎*/ $(function() { // 濡傛灉涓嶆敮鎸乸laceholder锛岀敤jQuery鏉ュ畬鎴 if(!isSupportPlaceholder()) { // 閬嶅巻鎵€鏈塱nput瀵硅薄, 闄や簡瀵嗙爜妗 $('input').not("input[type='password']").each( function() { var self = $(this); var val = self.attr("placeholder"); input(self, val); } ); /**//* 瀵筽assword妗嗙殑鐗规畩澶勭悊 * 1.鍒涘缓涓€涓猼ext妗 * 2.鑾峰彇鐒︾偣鍜屽け鍘荤劍鐐圭殑鏃跺€欏垏鎹 */ $('input[type="password"]').each( function(i) { var pwdField = $(this); var pwdVal = pwdField.attr('placeholder'); var pwdId = pwdField.attr('id'); // 閲嶅懡鍚嶈input鐨刬d涓哄師id鍚庤窡1 pwdField.after(''); var pwdPlaceholder = $('#' + pwdId + ''+i+''); pwdPlaceholder.show(); pwdField.hide(); pwdPlaceholder.focus(function(){ pwdPlaceholder.hide(); pwdField.show(); pwdField.focus(); }); pwdField.blur(function(){ if(pwdField.val() == '') { pwdPlaceholder.show(); pwdField.hide(); } }); } ); } }); // 鍒ゆ柇娴忚鍣ㄦ槸鍚︽敮鎸乸laceholder灞炴€ function isSupportPlaceholder() { var input = document.createElement('input'); return 'placeholder' in input; } // jQuery鏇挎崲placeholder鐨勫鐞 function input(obj, val) { var $input = obj; var val = val; $input.attr({value:val}); $input.focus(function() { if ($input.val() == val) { $(this).attr({value:""}); } }).blur(function() { if ($input.val() == "") { $(this).attr({value:val}); } }); } //end var InterValObj; //timer鍙橀噺锛屾帶鍒舵椂闂 var count = 60; //闂撮殧鍑芥暟锛?绉掓墽琛 var curCount;//褰撳墠鍓╀綑绉掓暟 var code = ""; //楠岃瘉鐮 function sendMessage01() { curCount = count; //璁剧疆button鏁堟灉锛屽紑濮嬭鏃 $("#btnSendCode01").attr("disabled", "true"); //$("#btnSendCode01").val( + curCount + "绉掑啀鑾峰彇"); $(".code_text").text( + curCount + "绉掑啀鑾峰彇"); $("#btnSendCode01").hide(); $(".code_text").show(); InterValObj = window.setInterval(SetRemainTime01, 1000); //鍚姩璁℃椂鍣紝1绉掓墽琛屼竴娆 } //timer澶勭悊鍑芥暟 function SetRemainTime01() { if (curCount == 0) { window.clearInterval(InterValObj);//鍋滄璁℃椂鍣 $("#btnSendCode01").removeAttr("disabled");//鍚敤鎸夐挳 $("#btnSendCode01").val("閲嶆柊鍙戦€?); code = ""; //娓呴櫎楠岃瘉鐮併€傚鏋滀笉娓呴櫎锛岃繃鏃堕棿鍚庯紝杈撳叆鏀跺埌鐨勯獙璇佺爜渚濈劧鏈夋晥 $(".code_text").hide(); $("#btnSendCode01").show(); } else { curCount--; //$("#btnSendCode01").val( + curCount + "绉掑啀鑾峰彇"); $(".code_text").text( + curCount + "绉掑啀鑾峰彇"); $("#btnSendCode01").hide(); $(".code_text").show(); } } function ScollText(obj){ if($(obj).length>0){ $(obj).mCustomScrollbar({ mouseWheelPixels:500, autoDraggerLength:false, advanced: { autoScrollOnFocus: "" } }); } }