$(function () { /*****************************绂佹娴忚鍣ㄧ缉鏀鹃〉闈?******************************/ function disablePageZoom (e) { if (e.ctrlKey) { if (e.wheelDelta || e.detail) { e.returnValue = false } if (e.keyCode === 107 || e.keyCode === 109 || e.keyCode === 187 || e.keyCode === 189) { e.returnValue = false } } } if (document.addEventListener) { document.addEventListener('mousewheel', disablePageZoom, false) document.addEventListener('DOMMouseScroll', disablePageZoom, false) document.addEventListener('keydown', disablePageZoom, false) } else { document.attachEvent('onmousewheel', disablePageZoom, false) document.attachEvent('onkeydown', disablePageZoom, false) } /*****************************鎵嬫満绔欏鑸垏鎹㈡寜閽?******************************/ $('.headerSJ .menu').on('click', function (event) { $('.headerSJ .navwrap').animate({ 'left': '0px', 'opacity': '1' }, 800) $('.headerSJ .navbg').fadeIn(800) }) $('.headerSJ .navbg').on('click', function (event) { $(this).fadeOut(800) $('.headerSJ .navwrap').animate({ 'left': '-50%', 'opacity': '0' }, 800) }) $('.headerSJ .plus').on('click', function () { //浜岀骇鏍忕洰鎵嬮鐞村垏鎹㈡晥鏋 $(this).toggleClass('minus').parent().siblings().find('.minus').removeClass('minus') $(this).next('.SJbod').stop().slideToggle(300).parent().siblings().find('.SJbod').stop().slideUp(500) }) /*****************************婊氬姩鐩戝惉鎵цcss3鍔ㄧ敾*******************************/ /* eg:
鍙€夊弬鏁帮細 data-wow-duration锛堝姩鐢绘寔缁椂闂达級 data-wow-delay锛堝姩鐢诲欢杩熸椂闂达級 data-wow-offset锛堝厓绱犵殑浣嶇疆闇插嚭鍚庤窛绂诲簳閮ㄥ灏戝儚绱犳墽琛岋級 data-wow-iteration锛堝姩鐢绘墽琛屾鏁帮級 */ if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) { var wow = new WOW({ boxClass: 'wow', // 闇€瑕佹墽琛屽姩鐢荤殑鍏冪礌鐨 class animateClass: 'animated', // animation.css 鍔ㄧ敾鐨 class offset: 0, // 鍏冪礌鐨勪綅缃湶鍑哄悗璺濈搴曢儴澶氬皯鍍忕礌鎵ц mobile: true, // 鏄惁鍦ㄧЩ鍔ㄨ澶囦笂鎵ц鍔ㄧ敾 live: true // 寮傛鍔犺浇鐨勫唴瀹规槸鍚︽湁鏁 }) wow.init() } $('.header2_inner > ul > li').on('mouseenter', function () { $(this).children('ul').stop().slideDown() }) $('.header2_inner > ul > li').on('mouseleave', function () { $(this).children('ul').stop().slideUp() }) $('.friend_link_footer').on('click', function () { $(this).children('ul').stop().slideToggle() }) $('.scroll, .industry_b a').on('click', function () { $.fn.fullpage.moveSectionDown() }) var st = $(window).scrollTop() if ($('.inner_banner').height() > 0 && st > 0) { $('.header2').addClass('active') } else { $('.header2').removeClass('active') } if (st > 0) { $('.back_top').show() } else { $('.back_top').hide() } $(window).on('scroll', function () { st = $(window).scrollTop() if ($('.inner_banner').height() > 0 && st > 0) { $('.header2').addClass('active') } else { $('.header2').removeClass('active') } if (st > 0) { $('.back_top').fadeIn() } else { $('.back_top').fadeOut() } }) $('.header2').on('mouseenter', 'li', function () { $('.header2 ul li.active').toggleClass('active unactive') }) $('.header2').on('mouseleave', 'li', function () { $('.header2 ul li.unactive').toggleClass('active unactive') }) function resizePublic () { if ($('.header2_inner > ul').length > 0) { var oLeft = $('.header2_inner > ul').offset().left $('.header2 .header2_inner > ul > li > ul').css({ paddingLeft: oLeft }) } } $('body').on('click', '.search .img, .search2 a', function () { $('.search_model').fadeIn().delay(400).children('.search_inp').slideDown() $('.search_inp input').focus() }) $('body').on('click', '.search_model .mask', function () { $('.search_inp input').blur() $('.search_inp').slideUp().delay(400).parent('.search_model').fadeOut() }) resizePublic() $(window).on('load', function () { resizePublic() }) $(window).on('resize', function () { resizePublic() }) $('input[name=top_keywords]').on('keypress', function (event) { if (event.keyCode == 13) { if ($('input[name=top_keywords]').val() != '') { location = 'result.aspx?key=' + $('input[name=top_keywords]').val() return false } } }) $('#top_searchBtn').on('click', function (event) { if ($('input[name=top_keywords]').val() != '') { location = 'result.aspx?key=' + $('input[name=top_keywords]').val() return false } }) $('input[name=index_keywords]').on('keypress', function (event) { if (event.keyCode == 13) { var timeType = 0 for (var i = 0; i < $("input[name=timeType]").length; i++) { if ($('input[name=timeType]').eq(i).prop('checked')) { timeType = i break } } location = 'result.aspx?key=' + $('input[name=index_keywords]').val() + '&timeType=' + timeType return false } }) $('#index_searchBtn').on('click', function (event) { var timeType = 0 for (var i = 0; i < $("input[name=timeType]").length; i++) { if ($('input[name=timeType]').eq(i).prop('checked')) { timeType = i break } } location = 'result.aspx?key=' + $('input[name=index_keywords]').val() + '&timeType=' + timeType return false }) $('form').submit(function () { return false }) })