$(document).ready(function() { $(".swiper-container-horizontal>.swiper-pagination-bullets").eq(1).show(); $(".swiper-container-horizontal>.swiper-pagination-bullets").eq(5).show(); $(".search_bat").click(function () { $(".search_bat1").slidedown(300); }) $(".close_input").click(function () { $(".search_bat1").slideup(300); }) $(".zhongwen dt").click(function () { $(".zhongwen dd").toggle(); }) $(".div_zong .div_p:gt(0)").hide(); $(".div_zong1 .div_p1:gt(0)").hide(); $(".center_left .feed img").hide(); $(".swiper-container-vertical>.swiper-pagination-bullets").eq(0).show(); $(".swiper-container-vertical>.swiper-pagination-bullets").eq(4).show(); /*$(".center_left .current img").show();*/ $(".center_left .feed").mouseover(function () { /*$(this).addclass("current").siblings().removeclass("current"); $(this).find("img").show();*/ index = $(this).index(); $(".div_zong .div_p").eq(index).show().siblings().hide(); $(".div_zong1 .div_p1").eq(index).show().siblings().hide(); }).mouseout(function () { $(this).siblings().find("img").hide(); }) $(document).ready(function (e) { //获取浏览器宽度 var _width = $(window).width(); if(_width < 800){ //直接为该div添加w1024样式,会覆盖前一个样式 $(".center_left .feed").each(function (i) { $(this).mouseenter(function () { $(this).addclass(".current"); }); }) } var dis = new array("/template/default/images/01.jpg", "/template/default/images/01.jpg", "/template/default/images/01.jpg", "/template/default/images/01.jpg", "/template/default/images/01.jpg", "/template/default/images/01.jpg"); $(".center_left .feed").each(function (i) { $(this).mouseenter(function () { var dd = 'url' + '(' + dis[i] + ')'; $(".center_left .feed").css({ 'height': '106px', 'padding-top': 0, 'color': '#999', 'background': 'none', 'width': '168px', 'line-height': '86px' }); $(this).css({'height': '106px','line-height':'106px', 'color': '#fff','text-align': 'center','padding-left': '0px', 'background': dd}); }); }) }) $(".new_dl dl").hover(function(){ $(this).css("background-color","#bd241d") $(this).find(".dd1") .css("color","#fff") $(this).find(".dd2") .css("color","#fff") $(this).find(".dd3") .css("color","#fff") },function(){ $(this).css("background-color","#fff") $(this).find(".dd1") .css("color","#000") $(this).find(".dd2") .css("color","#316a24") $(this).find(".dd3") .css("color","#666") }) })