function imgReload() { var imgHeight = 0; var wtmp = $("body").width(); $("#banner ul li").each(function () { $(this).css({ width: wtmp + "px" }); }); $(".sliderimg").each(function () { $(this).css({ width: wtmp + "px", height: wtmp * 0.28 + "px", }); imgHeight = $(this).height(); }); $(".banner").height(imgHeight); } // $(window).resize(function(){ // imgReload(); // }); $(function () { //轮播图实现 // imgReload(); // var unslider = $('#banner').unslider({ // dots: true, // fluid:true // }); // data = unslider.data('unslider'); // $('.unslider-arrow').click(function() { // var fn = this.className.split(' ')[1]; // data[fn](); // }); //产品区域鼠标经过效果 $(".xt_multi_img").each(function () { $(this).hover( function () { $(this).find(".xt_img").addClass("hover"); $(this) .find(".xt_img_subinfo>.xt_img_subinfo_bg") .addClass("bg"); }, function () { $(this).find(".xt_img").removeClass("hover"); $(this) .find(".xt_img_subinfo>.xt_img_subinfo_bg") .removeClass("bg"); } ); }); //新闻列表切换 // $(".news-tab ul").on("click","li",function () { // var $this = $(this); // var num = $this.index(); // $this.addClass("active").siblings().removeClass("active"); // $(".news-content .tab").each(function () { // $(this).addClass("none"); // }); // $(".news-content .tab").eq(num).removeClass("none"); // }); //智能制造切换 $(".production-l ul").on("click", "li", function () { var $this = $(this); var num = $this.index(); $this.addClass("active").siblings().removeClass("active"); $(".production-r .production-tab").each(function () { $(this).addClass("none"); }); $(".production-r .production-tab").eq(num).removeClass("none"); }); //视频实现 // $(".video-btn").click(function (e) { // e.stopPropagation(); // $(".xt-video").fadeIn(); // }) // $(".close").click(function () { // $(".xt-video").find("video")[0].pause(); // $(".xt-video").fadeOut(); // }) });