function sub(){ var name = document.getElementById("news_search_word").value; window.location = encodeURI(encodeURI("/search.html?searchCategory=totalSite&keyword=" + name)); } $(document).on("mousewheel DOMMouseScroll", function (e) { var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie (e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox if (delta > 0) { // 鍚戜笂婊 $(".c_portalResnav_main-01001 .header1").animate({top:'0',opacity: 1},30); $('#w_grid-1604451409255').css('top','-54px'); } else if (delta < 0) { // 鍚戜笅婊 $(".c_portalResnav_main-01001 .header1").animate({top:'-74',opacity: 0},30); $('#w_grid-1604451409255').css('top','0'); } }); $(function () { var nav = $(".header1"); //寰楀埌瀵艰埅瀵硅薄 var win = $(window); //寰楀埌绐楀彛瀵硅薄 var sc = $(document); //寰楀埌document鏂囨。瀵硅薄銆 win.scroll(function () { if (sc.scrollTop() >= 1) { nav.addClass("scroll"); }else { nav.removeClass("scroll"); } }); var _li =$('.header2 .sub-menu ul').children('.js-m-3'); _li.each(function(i, e) { $(this).addClass('delay0'+(i+1)); }); $(".mobile-nav-click a").on("click",function(){ $(".header2 .nav-btn").removeClass('hover'); $(".header2 .nav-btn").removeClass('active'); $(".header2 .nav-btn").children('.line1').stop(true,true).transition({rotate: 0}, 300); $(".header2 .nav-btn").children('.line2').stop(true,true).fadeIn(300); $(".header2 .nav-btn").children('.line3').stop(true,true).transition({rotate: 0}, 300); $(".header2 .nav-btn").parent(".main-wrap").siblings('.sub-menu').stop().fadeOut(); $("header .list-cont").removeClass('active'); $("body,html").stop(true,true).removeClass('ovh-f'); $(".search-bg").stop(true,true).fadeOut(); $(".header2").removeClass('active'); $(".sub-menu li").removeClass("animate"); var target = $(this).attr('href'); var target_top = $(target).offset().top; $('html,body').animate({ scrollTop : target_top } ,600, 'easeInOutQuad'); return false; }); $(".header2 .sub-menu .js-m-3").click(function () { $(this).children("div.sec-list").slideToggle('slow').end().find('.jt') .toggleClass('jtRote'); $(this).siblings('li').children('.sec-list').slideUp('slow').end().find('.jt') .removeClass('jtRote'); }); $(".search-btn").on('click', function () { $(".search-alert").addClass("active"); }); $(".search-alert .close").on('click', function () { $(".search-alert").removeClass("active"); }); indexnav(); function indexnav() { $(".header1 .subnav").hover(function () { $(".nav").addClass("on"); var k = $(this).index(); }, function () { $(".pc-sub-nav").stop(true, false).slideUp(300); var k = $(this).index(); $(".pc-sub-nav").hover(function () { $(".pc-sub-nav").stop(true, false).slideDown(300); $(".subnav").eq(k).addClass("cur").siblings(".subnav").removeClass("cur"); }, function () { $(".subnav").removeClass("cur"); $(".pc-sub-nav").stop(true, false).slideUp(300); }); }); $(".header1 .subnav2").hover(function () { $(this).find(".nav-sub").addClass("active").parents(".subnav2").siblings().find(".nav-sub").removeClass("active"); }, function () { $(this).find(".nav-sub").removeClass("active"); }); $(".header1").hover(function () { $(".header1").addClass("submenu_show"); }, function () { $(".header1").removeClass("submenu_show"); }); $(".header1 .subnav3").hover(function () { $(this).find(".navUlSj").show(); }, function () { $(this).find(".navUlSj").hide(); }); } }); $(function() { (function() { var w = setInterval(function() { $("img[src*='.jpg_']").each(function() { $(this).attr("src", $(this).attr("src").split(".jpg_")[0] + ".jpg"); }); $("img[src*='.png_']").each(function() { $(this).attr("src", $(this).attr("src").split(".png_")[0] + ".png"); }); }, 100); })(); }); $(function(){ var nav = $(".f-cb"); var init = $(".f-cb .hvr-left").eq(ind); $(".f-cb").slide({ type: "menu", titCell: ".hvr-left", targetCell: ".nav-sub", delayTime: 300, triggerTime: 0, returnDefault: true, defaultIndex: ind }); }); var ind = 0;