$(document).ready(function(){ var kd = $(window).width()+30; bplay(); //鑷姩鎾斁 // var z=$(".imgList li").length; var b=0; var t=0; gstp(); animate() $(window).scroll(function() { animate() //瀹炴椂鑾峰彇婊氬姩鏉$殑璺濈锛屽厓绱犱竴鍑虹幇鍦ㄥ彲瑙嗗尯鍩熷氨娣诲姞鍔ㄧ敾鏁堟灉锛 }); //v(); $("#dolist li").mouseenter(function(){ clearInterval(timer); var t=$(this).index(); var d=t+1; var go = t * kd; //$(".imgList").animate({ "left" : -1000 },500); $(".imgList").animate({left: "-" + go + "px"}, 500); $(this).addClass('on').siblings().removeClass("on"); }); $("#dolist li").mouseleave(function(){ bplay(); }); //褰撻紶鏍囩Щ鍒板浘鐗囦笂鍏抽棴瀹氭椂鍣紝绂诲紑鏃跺垯閲嶇疆瀹氭椂鍣 $(".imgList").hover(function(){ clearInterval( timer ); },function(){ bplay(); }); function v(){ //$("#os").addClass("fadeInLeftBig") //$("#ox").addClass("fadeInRightBig"); } var timer; function bplay(){ timer=setInterval(function(){ //璁剧疆闂存瓏璋冪敤锛屾椂闂撮棿闅斾负1500姣 //next.onclick() //姝ゅ鏄嚜鍔ㄥ悜鍙冲垏鎹紝濡傛灉鎯宠缃负鍚戝乏鍒囨崲锛屾妸next鎹负prev鍗冲彲 zdfy() },3000) } function zdfy(){ //var c=1; if (b==2){ b=0; } //var d=parseInt(b)-1; //$("#banner li").eq(d).addClass('on').siblings('li').removeClass('on'); ////$("#banner li").eq(d).fadeIn().siblings('li').fadeOut(); //$("#banner li").eq(d).find(".ss").addClass("fadeInLeftBig") //$("#banner li").eq(d).find(".xx").addClass("fadeInRightBig"); var go = b*kd; // $(".imgList").animate({ "left" : -go },500); $(".imgList").animate({left: "-" + go + "px"}, 500); $("#dolist li").eq(b).addClass("on").siblings('li').removeClass("on"); b=b+1; //if (b>z){ //b=1; //} } //鍏徃鍥剧墖杞挱 var gstimer; function gstp(){ gstimer=setInterval(function(){ //璁剧疆闂存瓏璋冪敤锛屾椂闂撮棿闅斾负1500姣 gstpfy() },2000) } function zdfy(){ //var c=1; if (b==2){ b=0; } var go = b*kd; $(".imgList").animate({left: "-" + go + "px"}, 500); $("#dolist li").eq(b).addClass("on").siblings('li').removeClass("on"); b=b+1; } function gstpfy(){ if (t==2){ t=0; } $("#gstplist li").eq(t).fadeIn().siblings('li').fadeOut(); t=t+1; } //鍔犺浇鍔ㄧ敾鏁堟灉 function animate() { var a = $("#about").offset().top; //鍏冪礌鍒版祻瑙堝櫒椤堕儴鐨勮窛绂 if (a >= $(window).scrollTop() && a < ($(window).scrollTop() + $(window).height())) { //椤甸潰涓婃媺鍏冪礌鍑虹幇鍦ㄥ彲瑙嗗寲鍖哄煙 $('#jjnr').addClass('animated fadeInLeftBig'); $('#gstp').addClass('animated fadeInRightBig'); $('#szk').addClass('animated fadeInUpBig'); } var b = $("#yw").offset().top; //鍏冪礌鍒版祻瑙堝櫒椤堕儴鐨勮窛绂 if (b >= $(window).scrollTop() && b< ($(window).scrollTop() + $(window).height())) { //椤甸潰涓婃媺鍏冪礌鍑虹幇鍦ㄥ彲瑙嗗寲鍖哄煙 $('#ywbt').addClass('animated fadeInLeftBig'); $('#ywlist').addClass('animated fadeInUpBig'); } var c = $("#hb").offset().top; //鍏冪礌鍒版祻瑙堝櫒椤堕儴鐨勮窛绂 if (c >= $(window).scrollTop() && b< ($(window).scrollTop() + $(window).height())) { //椤甸潰涓婃媺鍏冪礌鍑虹幇鍦ㄥ彲瑙嗗寲鍖哄煙 var c = $("#hb").offset().top; //鍏冪礌鍒版祻瑙堝櫒椤堕儴鐨勮窛绂 if (c >= $(window).scrollTop() && c< ($(window).scrollTop() + $(window).height())) { //椤甸潰涓婃媺鍏冪礌鍑虹幇鍦ㄥ彲瑙嗗寲鍖哄煙 $('#hbbt').addClass('animated fadeInLeftBig'); $('#hblist').addClass('animated fadeInUpBig'); } var d = $("#xw").offset().top; //鍏冪礌鍒版祻瑙堝櫒椤堕儴鐨勮窛绂 if (d >= $(window).scrollTop() && d< ($(window).scrollTop() + $(window).height())) { //椤甸潰涓婃媺鍏冪礌鍑虹幇鍦ㄥ彲瑙嗗寲鍖哄煙 $('#xwbt').addClass('animated fadeInLeftBig'); $('#xwlist').addClass('animated fadeInUpBig'); } } } /* $("#ywlist li").mouseover(function(){ $(this).animate({width:'60%'}).siblings('li').animate({width:'20%'}); }); */ //鏈烘煖璁惧 $("#ywlist li").mouseenter(function(){ var o=$(this).attr('id'); var p=o.split("-"); var s=p[1]; // var display=$(this).children('.nr').css('display') // if(display=='none'){ for(var i=1;i<=6;i++) { if(s!=i) { $("#yw-"+i).animate({width:'13.75%'}); // $("#yw-"+i).children(".lb").fadeIn(); $("#yw-"+i).children(".xh").css({"top":"500px","left":"70%"}); $("#yw-"+i).children(".tb").css({"top":"20px","left":"50px"}); $("#yw-"+i).children(".bt").css({"top":"80px","left":"50px"}); $("#yw-"+i).children(".nr").hide() $("#yw-"+i).children(".gd").hide() } } $("#yw-"+s).animate({width:'45%'}); $("#yw-"+s).children(".nr").fadeIn(); $("#yw-"+s).children(".gd").fadeIn(); $("#yw-"+s).children(".xh").css({"top":"20px","left":"50px"}); $("#yw-"+s).children(".tb").css({"top":"110px","left":"50px"}); $("#yw-"+s).children(".bt").css({"top":"160px","left":"50px"}); //$("#yw-"+s).children(".lb").fadeOut(); //} /* else{ $("#yw li").animate({width:'20%'}); // $(this).children(".lb").fadeIn(); // $(this).children(".bt").hide(); $(this).children(".nr").hide() } */ }) $("#a1").mouseenter(function(){ $(this).find(".lbx img").attr("src", "images/lbx-01.jpg"); $(this).find(".bt a").css("color", "#206CB3") $(this).find(".wz a").css("color", "#000000") }); $("#a1").mouseleave(function(){ $(this).find(".lbx img").attr("src", "images/lbx-1.jpg"); $(this).find(".bt a").css("color", "#000") $(this).find(".wz").css("color", "#505050") }); $("#a2").mouseenter(function(){ $(this).find(".lbx img").attr("src", "images/lbx-02.jpg"); $(this).find(".bt a").css("color", "#206CB3") $(this).find(".wz").css("color", "#000000") }); $("#a2").mouseleave(function(){ $(this).find(".lbx img").attr("src", "images/lbx-2.jpg"); $(this).find(".bt a").css("color", "#000") $(this).find(".wz").css("color", "#505050") }); $("#a3").mouseenter(function(){ $(this).find(".lbx img").attr("src", "images/lbx-03.jpg"); $(this).find(".bt a").css("color", "#206CB3") $(this).find(".wz").css("color", "#000000") }); $("#a3").mouseleave(function(){ $(this).find(".lbx img").attr("src", "images/lbx-3.jpg"); $(this).find(".bt a").css("color", "#000") $(this).find(".wz").css("color", "#505050") }); $("#a4").mouseenter(function(){ $(this).find(".lbx img").attr("src", "images/lbx-04.jpg"); $(this).find(".bt a").css("color", "#206CB3") $(this).find(".wz").css("color", "#000000") }); $("#a4").mouseleave(function(){ $(this).find(".lbx img").attr("src", "images/lbx-4.jpg"); $(this).find(".bt a").css("color", "#000") $(this).find(".wz").css("color", "#505050") }); /*妗堜緥鍒楄〃*/ $("#alist li").hover(function(){ $(this).find(".ac").animate({height:'350px'},300); $(this).find(".ab").animate({height:'90px'},300); $(this).find(".almc").css("color","#fff"); },function(){ $(this).find(".ac ").animate({height:'0'},300); $(this).find(".ab").animate({height:'40'},300); $(this).find(".almc").css("color","#fff"); }); $("#clist").mouseenter(function(){ $("#d-1").show(); }); $("#clist li").mouseenter(function(){ var opt=$(this).attr('id'); opt=opt.split("-"); var s=opt[1]; $(this).find(".tb img").attr("src","/images/c_pic"+s+"b.png"); $(this).find(".lbmc a").css("color", "#1AFFD0") for(var i=1;i<=6;i++) { $("#d-"+i).hide(); } $("#d-"+s).show(); }); $("#clist li").mouseleave(function(){ var opt=$(this).attr('id'); opt=opt.split("-"); var s=opt[1]; $(this).find(".tb img").attr("src","/images/c_pic"+s+".png"); $(this).find(".lbmc a").css("color", "#fff") }); $(".cplist li").mouseenter(function() { $(this).find(".zzc").css("display","block")}).mouseleave(function() { $(this).find (".zzc").css("display","none") }) //璧勮 $("#xwlb li").mouseenter(function(){ var opt=$(this).attr('id'); opt=opt.split("-"); var s=opt[1]; $("#xwlb li").removeClass("on") $(this).addClass("on"); for(var i=1;i<=4;i++) { $("#u-"+i).hide(); } $("#u-"+s).show(); }); $(".news li").mouseenter(function() { $(this).addClass("on") }).mouseleave(function() { $(this).removeClass("on") }) $("#ewmk").mouseenter(function() { $(this).addClass("on") }).mouseleave(function() { $(this).removeClass("on") }) //鍚堜綔鍝佺墝 $(".pp li").hover(function(){ $(this).find().stop(false,true); $(this).find(".tpk").animate({top: -91},200); $(this).find(".wzk").animate({top: 0},200); },function(){ $(this).find().stop(false,true); $(this).find(".tpk").animate({top:0},200); $(this).find(".wzk").animate({top:-91},200); }); //棣栭〉鎼滅储 $("#soso").click(function(){ var sss=$("#sss").val() if (sss==""){ return false; }else{ $("#dbd").submit();} }); /* $("#ful li").mouseenter(function() { $(this).addClass("on") }).mouseleave(function() { $(this).removeClass("on") }) */ }); ////////////////// // JavaScript Document function d(id) { for(var i=1;i<=2;i++) { if(id!=i) { document.getElementById("nr"+i).style.display="none"; document.getElementById("kd"+i).className=""; } } document.getElementById("nr"+id).style.display = "block"; document.getElementById("kd"+id).className="on"; } $(".nav li").mouseenter( function(){ $(this).find(".iconk img").stop(true,true).animate({top:21}) } ) $(".nav li").mouseleave( function(){ $(this).find(".iconk img").stop(true,true).animate({top:0}) } )