$(function(){ var speed =1000; $(window).scroll(function(){ if ($(window).scrollTop()>200){ $("#xn_c_7_wrap").fadeIn(speed); }else{ $("#xn_c_7_wrap").fadeOut(speed); } }); $("#xn_c_7_main").click(function(){ $("html,body").animate({"scrollTop":0}); }); }); $(function(){ var time = 4000; //设置向上滚动时间间隔 var IsAutoScroll = false; //设置是否自动滚动 var speed = 600; //设置滚动速度 var listHeight = $(".xn_c_9_list").outerHeight(true) var index = $(".xn_c_9_wbox").outerHeight(true) / listHeight; var indexSlied = Math.ceil($(".xn_c_9_list").length / index); var boxHeight = $(".xn_c_9_wbox").outerHeight(true); var UpOrDown = true; if(IsAutoScroll) setInterval(scroll,time); function scroll () { if(UpOrDown){ if($(".xn_c_9_wbox").scrollTop() < (indexSlied-1)*boxHeight){ $(".xn_c_9_wbox").animate({"scrollTop":listHeight+$(".xn_c_9_wbox").scrollTop()},speed); } if($(".xn_c_9_wbox").scrollTop() == (indexSlied-1)*boxHeight) UpOrDown = false; }else{ if($(".xn_c_9_wbox").scrollTop() > "0"){ $(".xn_c_9_wbox").animate({"scrollTop":$(".xn_c_9_wbox").scrollTop()-listHeight},speed); } if($(".xn_c_9_wbox").scrollTop() == "0") UpOrDown = true; } }; $(".xn_c_9_UpControl").bind("click",function(){ if($(".xn_c_9_wbox").scrollTop() > "0"){ $(".xn_c_9_wbox").animate({"scrollTop":$(".xn_c_9_wbox").scrollTop()-listHeight},speed); } }); $(".xn_c_9_DownControl").bind("click",function(){ if($(".xn_c_9_wbox").scrollTop() < (indexSlied-1)*boxHeight){ $(".xn_c_9_wbox").animate({"scrollTop":listHeight+$(".xn_c_9_wbox").scrollTop()},speed); } }); }); $(document).ready(function(){ var i = 0; var w=$(".xn_c_12_box").outerWidth(); $(".xn_c_12_box").each(function (n,element) { $(".xn_c_12_control").append(""); }); $(".xn_c_12_control span").first().addClass("xn_c_12_lights_active"); $(".xn_c_12_control span").bind("click",function(){ i = $(this).index();CaseControlRoll(i); }); function CaseControlRoll(index) { $(".xn_c_12_control span").removeClass("xn_c_12_lights_active"); $(".xn_c_12_control span").eq(index).addClass("xn_c_12_lights_active"); $(".xn_c_12_content").animate({"scrollLeft":w*index},"slow"); }; //内页动态切换案例结束 }); $(function(){ var speed = 500; var timeout = 3000; var IsAutoScroll = true; var count = 0; var listLength = $(".xn_c_17_list").length; var listWidth = $(".xn_c_17_list").outerWidth(true); var boxWidth = $(".xn_c_17_wbox").outerWidth(true); var allListWidth = listLength * listWidth; $(".xn_c_17_scroll").css('width',allListWidth); for (var i = 0; i < listLength; i++) { $(".xn_c_17_control").append(""); }; $(".xn_c_17_control span").first().addClass('xn_c_17_lights_active'); $(".xn_c_17_control span").each(function(){ $(this).bind('click',function(){ var index = $(this).index(); $(this).addClass('xn_c_17_lights_active').siblings().removeClass('xn_c_17_lights_active'); $(".xn_c_17_wbox").animate({"scrollLeft":index*listWidth},speed); count = index; }); }); if(IsAutoScroll){ setInterval(function(){ $(".xn_c_17_control span").eq(count).click(); count++; if(count >listLength){ count = 0; } },timeout); } }); $(function(){ var $items = $("#xn_c_19_ul"); var $out = $(".xn_c_19_main"); var $items_child_width = $items.children().outerWidth(true); var iLilen=$items.children(".xn_c_19_li").length; $items.css('width',$items_child_width*iLilen+'px'); $("#xn_c_19_left").click(function(){ nextImg(); }); $("#xn_c_19_right").click(function(){ prevImg(); }); function nextImg(){ $items.stop().animate({left:"-"+$items_child_width +"px"},500,function(){ $items.append($items.children().first()); $items.css("left",0); }); } function prevImg(){ $items.css('left',-$items_child_width); $items.prepend($items.children().last()); $items.stop().animate({"left":0},500); } function arrowScroll(){ nextImg(); }; var auto = setInterval(arrowScroll,3000); $out.hover(function(){ clearInterval(auto); },function(){ auto = setInterval(arrowScroll,3000); }); }); $(function(){ $("#xn_c_prodv_22_cont").children("div").eq(0).show(); $("#xn_c_prodv_22_hUl li").click(function(){ $(this).addClass("xn_c_prodv_22_hLiHover").siblings().removeClass("xn_c_prodv_22_hLiHover"); $("#xn_c_prodv_22_cont").children("div").eq($("#xn_c_prodv_22_hUl li").index($(this))).slideDown(300).siblings().slideUp(300); }); }); jQuery(function(){ //图库弹出层 $(".xn_c_prodv_49_mskeLayBg").height($(document).height()); $(".xn_c_prodv_49_mskeClaose").click(function(){$(".xn_c_prodv_49_mskeLayBg,.xn_c_prodv_49_mskelayBox").hide()}); $(".xn_c_prodv_49_msKeimgBox li").click(function(){$(".xn_c_prodv_49_mske_html").html($(this).find(".xn_c_prodv_49_hidden").html()); $(".xn_c_prodv_49_mskeLayBg").show();$(".xn_c_prodv_49_mskelayBox").fadeIn(300)}); $(".xn_c_prodv_49_mskeTogBtn").click(function(){$(".xn_c_prodv_49_msKeimgBox").toggleClass("xn_c_prodv_49_msKeimgBox2"); $(this).toggleClass("xn_c_prodv_49_mskeTogBtn2")}); })