// $(window).ready(function(){ $.include(jextpath + 'org/viewport.js', 750); // }) function change_line_width(){ var line = $("#tab-list .line"); var swiper = $.swiper("#tab-list .tab"); var x = $("#tab-list .tab .slide.on").offset().left; var w = $("#tab-list .tab .slide.on").width(); $(line).width(x+w); } function news_top_change(){ $(this).find(".right-box").html($(this).find(".swiper-slide-active .right").html()) } /*广告图入场效果*/ function changeSwiperAnimate(){ swiperAnimate($.swiper(this)); } $(document).on("click","#join-list .border",function(){ var big = $(this).parent(); if (big.hasClass('open')) { big.removeClass('open'); }else{ $('#join-list .join').removeClass('open'); big.addClass('open'); } }); $(document).on("hover","#header .nav li",function(){ var _this = $(this); var index = $(_this).index(); if(!$("#secode_box .item").eq(index).html()){return false;} $(_this).addClass("on"); $("#secode_box").height(80); $("#secode_box .item").eq(index).removeClass("hide").siblings().addClass('hide'); }); $(document).on("mouseout","#header .nav li",function(){ var _this = $(this); setTimeout(function(){ if(!$("#secode_box").is(":hover")){ $("#secode_box").height(0); $(_this).removeClass("on"); } },10); }); $(document).on("mouseout","#secode_box",function(){ if(!$("#secode_box").is(":hover")){ $("#secode_box").height(0); $("#header .nav li").removeClass("on"); } }); //菜单下拉 $(document).on("click","#header .menu",function(){ if ($(this).hasClass('close')) { $(this).removeClass('close'); $('#menu').removeClass('inmenu'); }else{ $(this).addClass('close'); $('#menu').addClass('inmenu'); } }); $(document).on("click","#menu .second .btn",function(){ var btn = $(this); var big = btn.parent().parent(); if (btn.parent().hasClass('in')) { btn.parent().removeClass('in'); big.find('.two').height(0); }else{ $('#menu .second .btn').removeClass('in'); $('#menu .second .two').height(0); btn.parent().addClass('in'); var nh2 = big.find('.h').height(); big.find('.two').height(nh2+40); } });