$(function() { $('.whole1 ul li').hover(function(e) { $(this).stop().animate({'width':'520px'},500).siblings().stop().animate({'width':'340px'},500); }); // 导航 $(".nav_ul li").mouseover(function() { var ds = $(this).find(".cnavli").size(); if ($(this).index() == 1 && ds==0) { $(this).html('关于我们
'); } if ($(this).index() == 2 && ds==0) { $(this).html('主要产业'); } if ($(this).index() == 3 && ds==0) { $(this).html('新闻中心'); } if ($(this).index() == 4 && ds==0) { $(this).html('党建工作'); } if ($(this).index() == 5 && ds==0) { $(this).html('投资者关系'); } if ($(this).index() == 6 && ds==0) { $(this).html('客户服务'); } if ($(this).index() == 7 && ds==0) { $(this).html('纳贤招士'); } ds = $(this).find(".cnavli").size(); if (ds > 0) { $(this).find(".cnavli").show(); $(".header .cnav").show(); } }); $(".nav_ul li").mouseout(function() { $(".cnavli").hide(); $(".header .cnav").hide(); }); // banner var w = $(window).width(); var h = $(window).height(); if (w >= 1200) { $('#c-banner').height(h); $(".swiper-container .swiper-slide img").each(function() { if ($(this).width() < w) { $(this).width(w); } if ($(this).height() < h) { $(this).height(h); $(this).css("marginleft", ($(this).width() - w) / 2); } if ($(this).height() > h) { $(this).height(h); } }); } })