// 椤堕儴 //scrollTop $(window).scroll(function() { var scrolls = $(window).scrollTop() if (scrolls > 150) { $("#top_nav").addClass("navbar-fixed-top") } else { $("#top_nav").removeClass("navbar-fixed-top") } }); $(function() { $(".search-btn").on("click", function() { $(".search_sec").addClass("active"); return false; }); $(".close-search").on("click", function() { $(".search_sec").removeClass("active"); return false; }); //婊戝埌椤堕儴 var newtop; $('.footerBack').on('click', function() { var timer = setInterval(function() { newtop = $(document).scrollTop(); if ($(document).scrollTop() == 0) { clearInterval(timer); } else { var a = $(document).scrollTop(newtop - 20); } }, 10); }); }); $(function() { //婊氬姩鍔ㄧ敾 window.scrollReveal = new scrollReveal(); //鏁板瓧鍔ㄧ敾 $("[data-ride|='numberGrow']").countUp({ delay: 10, time: 1500 }); }); // 鎷涜仒宀椾綅 $('.joinOpen').click(function() { $(this).hasClass('center') ? $(this).removeClass('center').addClass('jobClose') : $(this) .removeClass('jobClose').addClass('center'); $(this).parent().siblings('.jobNeed').slideToggle(); $(this).find('img').attr('src', '/static/home/images/down1.png'); if ($('.joinOpen').hasClass('jobClose')) { $(this).removeClass('jobClose'); $(this).find('img').attr('src', '/static/home/images/up.png'); } }) jQuery(window).scroll(function() { var windowTop = $(window).scrollTop(); if (windowTop) { jQuery(".top").addClass("scoll-top ibox-scoll"); $(this).addClass("scoll-top"); } else { jQuery(".top").removeClass("scoll-top ibox-scoll"); } }); // 瑙嗛 $('.popclose').click(function() { $('.popbg').fadeOut(); }) $('.video-btn').click(function() { var index = $(this).parents('.video-box').index(); $('.vedio-list').find('.video-popwrap').eq(index - 1).fadeIn(); $('.popbg').fadeIn(); }) $('.menuMoblie li').click(function(){ $(this).find('.sub-item').show(); }) $('.navH').hover(function(){ $(this).find('.navMenu').show(); },function(){ $(this).find('.navMenu').hide(); }) // 鑿滃崟鏍忓睍寮€ $(function(){ var index=0; $(".span2").click(function(){ index++; if(index%2==0){ if($(this).children("ul").is(":hidden")){ $(this).children("ul").fadeIn(500).end().siblings().children("ul").fadeOut(0); $(this).children(".flex").addClass("active").end().siblings().children(".flex").removeClass("active"); $(this).children("div").children("img").show(); $(this).siblings().children("div").children("img").hide(); }else{ $(this).children("ul").hide().end().children(".flex").removeClass("active"); } }else{ if($(this).children("ul").is(":hidden")){ $(this).children("ul").fadeIn(500).end().siblings().children("ul").fadeOut(0); $(this).children(".flex").addClass("active").end().siblings().children(".flex").removeClass("active"); $(this).children("div").children("img").show(); $(this).siblings().children("div").children("img").hide(); }else{ $(this).children("ul").hide().end().children(".flex").removeClass("active"); } } }) }) window.onload = function() { function throttle(method, delay, duration) { var timer = null, begin = new Date(); return function() { var context = this, args = arguments, current = new Date(); clearTimeout(timer); if (current - begin >= duration) { method.apply(context, args); begin = current; } else { timer = setTimeout(function() { method.apply(context, args); }, delay); } }; } $(window).scroll(function(){ throttle(onmousewheel(), 100, 100) }); function onmousewheel() { var top = $(window).scrollTop(); var guntop = $(".guntop").offset().top; var endguntop = $(".endguntop").offset().top; if (top > guntop) { $(".reckon").addClass("reckon_fixed_top"); if (top > endguntop -700 ) { $(".reckon").removeClass("reckon_fixed_top"); $(".reckon").addClass("reckon_fixed_bottom"); } else { $(".reckon").removeClass("reckon_fixed_bottom"); $(".reckon").addClass("reckon_fixed_top"); } } else { $(".reckon").removeClass("reckon_fixed_top"); } } }; $('.nav-link').click(function(){ $(this).siblings('.sub-item').slideToggle() }) $('.askMore').hover(function(){ $('.askList').addClass('aop'); $('.askMore').addClass('t15'); },function(){ // $('.askList').removeClass('aop'); }) var navIcon = $('.newSwtich>p'); for (var i = 0; i < navIcon.length; i++) { $(navIcon).click(function() { $(this).addClass('on'); $(this).siblings().removeClass('on'); var navi = $(this).index(); var navContent =$('.newsContainer>div'); $(navContent[navi]).show(); $(navContent[navi]).siblings().hide(); }) } var navIcon1 = $('.Toge>div'); for (var i = 0; i < navIcon1.length; i++) { $(navIcon1).hover(function() { $(this).addClass('on'); $(this).siblings().removeClass('on'); var navi = $(this).index(); var navContent1 =$('.Model>a'); $(navContent1[navi]).show(); $(navContent1[navi]).siblings().hide(); }) }