(Created page with "→自定义Human Practices效果: $(function(){ $(".header .nav .mainnav").eq(4).hover(function(){ $(".header .nav .Human_Practices span").css("color","#FAEE0D"); },fun...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
}); | }); | ||
− | /* | + | |
+ | |||
+ | /*Content_nav*/ | ||
$(function(){ | $(function(){ | ||
− | var | + | var bannerHeight=$(".SSTi-SZGD").outerHeight()-$(window).scrollTop(); |
− | + | if(bannerHeight<=0){ | |
− | + | $(".Content_nav").css({"position":"fixed","top":"10px"}); | |
− | + | }else{ | |
− | + | $(".Content_nav").css({"position":"absolute","top":"auto"}); | |
− | + | } | |
− | + | $(window).scroll(function(){ | |
− | + | ||
− | + | var bannerHeight=$(".SSTi-SZGD").outerHeight()-$(window).scrollTop(); | |
− | + | ||
− | + | if(bannerHeight<=0){ | |
− | + | $(".Content_nav").css({"position":"fixed","top":"10px"}); | |
+ | }else{ | ||
+ | $(".Content_nav").css({"position":"absolute","top":"auto"}); | ||
+ | } | ||
+ | |||
+ | }); | ||
− | + | /*锚链接跳转滑动*/ | |
− | + | $('.Content_nav ul li a').click(function(){ | |
− | + | $('html, body').animate({ | |
− | + | scrollTop: $( $.attr(this, 'href') ).offset().top | |
− | + | }, 500); | |
− | + | return false; | |
+ | }); | ||
− | + | }); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | /*轮播*/ | |
− | + | $(function(){ | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | //public | |
− | + | var scrollLenth=$(".Content .img_total").outerWidth(); | |
− | + | $(".Content .img_total .scroll").css("left",-scrollLenth); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | $( | + | //April_29 |
+ | $("#April_29 .img_total").hover(function(){ | ||
+ | |||
+ | clearInterval(April_29_Time); | ||
+ | $("#April_29 .img_total .icon_left").css("display","block"); | ||
+ | $("#April_29 .img_total .icon_right").css("display","block"); | ||
− | + | },function(){ | |
− | + | $("#April_29 .img_total .icon_left").css("display","none"); | |
− | + | $("#April_29 .img_total .icon_right").css("display","none"); | |
− | + | April_29_Time=setInterval("April_29_ScrollRight()",3000); | |
− | + | ||
− | + | ||
− | + | }); | |
− | + | ||
− | + | $("#April_29 .img_total .icon_left").click(function(){ | |
− | + | April_29_ScrollLeft(); | |
− | + | }); | |
− | + | ||
+ | $("#April_29 .img_total .icon_right").click(function(){ | ||
+ | April_29_ScrollRight(); | ||
+ | }); | ||
+ | |||
+ | //June_22 | ||
+ | $("#June_22 .img_total").hover(function(){ | ||
+ | |||
+ | clearInterval(June_22_Time); | ||
+ | $("#June_22 .img_total .icon_left").css("display","block"); | ||
+ | $("#June_22 .img_total .icon_right").css("display","block"); | ||
− | + | },function(){ | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | $("#June_22 .img_total .icon_left").css("display","none"); | |
− | + | $("#June_22 .img_total .icon_right").css("display","none"); | |
− | + | June_22_Time=setInterval("June_22_ScrollRight()",3000); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | }); | |
− | + | ||
− | + | $("#June_22 .img_total .icon_left").click(function(){ | |
− | + | June_22_ScrollLeft(); | |
− | + | }); | |
− | + | ||
− | + | $("#June_22 .img_total .icon_right").click(function(){ | |
− | + | June_22_ScrollRight(); | |
− | + | }); | |
− | + | ||
− | + | //July_11 | |
− | + | $("#July_11 .img_total").hover(function(){ | |
− | + | ||
− | + | clearInterval(July_11_Time); | |
− | + | $("#July_11 .img_total .icon_left").css("display","block"); | |
− | + | $("#July_11 .img_total .icon_right").css("display","block"); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | },function(){ | |
− | + | ||
− | + | $("#July_11 .img_total .icon_left").css("display","none"); | |
− | + | $("#July_11 .img_total .icon_right").css("display","none"); | |
− | + | July_11_Time=setInterval("July_11_ScrollRight()",3000); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | }); | ||
+ | |||
+ | $("#July_11 .img_total .icon_left").click(function(){ | ||
+ | July_11_ScrollLeft(); | ||
+ | }); | ||
+ | |||
+ | $("#July_11 .img_total .icon_right").click(function(){ | ||
+ | July_11_ScrollRight(); | ||
+ | }); | ||
+ | |||
+ | //July_26 | ||
+ | $("#July_26 .img_total").hover(function(){ | ||
+ | |||
+ | clearInterval(July_26_Time); | ||
+ | $("#July_26 .img_total .icon_left").css("display","block"); | ||
+ | $("#July_26 .img_total .icon_right").css("display","block"); | ||
+ | |||
+ | },function(){ | ||
+ | |||
+ | $("#July_26 .img_total .icon_left").css("display","none"); | ||
+ | $("#July_26 .img_total .icon_right").css("display","none"); | ||
+ | July_26_Time=setInterval("July_26_ScrollRight()",3000); | ||
+ | |||
+ | }); | ||
+ | |||
+ | $("#July_26 .img_total .icon_left").click(function(){ | ||
+ | July_26_ScrollLeft(); | ||
+ | }); | ||
+ | |||
+ | $("#July_26 .img_total .icon_right").click(function(){ | ||
+ | July_26_ScrollRight(); | ||
+ | }); | ||
+ | |||
+ | //July_29 | ||
+ | $("#July_29 .img_total").hover(function(){ | ||
+ | |||
+ | clearInterval(July_29_Time); | ||
+ | $("#July_29 .img_total .icon_left").css("display","block"); | ||
+ | $("#July_29 .img_total .icon_right").css("display","block"); | ||
+ | |||
+ | },function(){ | ||
+ | |||
+ | $("#July_29 .img_total .icon_left").css("display","none"); | ||
+ | $("#July_29 .img_total .icon_right").css("display","none"); | ||
+ | July_29_Time=setInterval("July_29_ScrollRight()",3000); | ||
+ | |||
+ | }); | ||
+ | |||
+ | $("#July_29 .img_total .icon_left").click(function(){ | ||
+ | July_29_ScrollLeft(); | ||
+ | }); | ||
+ | |||
+ | $("#July_29 .img_total .icon_right").click(function(){ | ||
+ | July_29_ScrollRight(); | ||
}); | }); | ||
}); | }); | ||
+ | |||
+ | var April_29_Time=setInterval("April_29_ScrollRight()",3000); | ||
+ | var June_22_Time=setInterval("June_22_ScrollRight()",3000); | ||
+ | var July_11_Time=setInterval("July_11_ScrollRight()",3000); | ||
+ | var July_26_Time=setInterval("July_26_ScrollRight()",3000); | ||
+ | var July_29_Time=setInterval("July_29_ScrollRight()",3000); | ||
+ | |||
+ | //April_29 | ||
+ | function April_29_ScrollLeft(){ | ||
+ | |||
+ | var scrollLenth=$("#April_29 .img_total").outerWidth(); | ||
+ | $("#April_29 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ | ||
+ | $("#April_29 .img_total .scroll").prepend($("#April_29 .img_total .scroll img:last")); | ||
+ | $("#April_29 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function April_29_ScrollRight(){ | ||
+ | |||
+ | var scrollLenth=$("#April_29 .img_total").outerWidth(); | ||
+ | $("#April_29 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ | ||
+ | $("#April_29 .img_total .scroll").append($("#April_29 .img_total .scroll img:first")); | ||
+ | $("#April_29 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | //June_22 | ||
+ | function June_22_ScrollLeft(){ | ||
+ | |||
+ | var scrollLenth=$("#June_22 .img_total").outerWidth(); | ||
+ | $("#June_22 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ | ||
+ | $("#June_22 .img_total .scroll").prepend($("#June_22 .img_total .scroll img:last")); | ||
+ | $("#June_22 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function June_22_ScrollRight(){ | ||
+ | |||
+ | var scrollLenth=$("#June_22 .img_total").outerWidth(); | ||
+ | $("#June_22 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ | ||
+ | $("#June_22 .img_total .scroll").append($("#June_22 .img_total .scroll img:first")); | ||
+ | $("#June_22 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | //July_11 | ||
+ | function July_11_ScrollLeft(){ | ||
+ | |||
+ | var scrollLenth=$("#July_11 .img_total").outerWidth(); | ||
+ | $("#July_11 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ | ||
+ | $("#July_11 .img_total .scroll").prepend($("#July_11 .img_total .scroll img:last")); | ||
+ | $("#July_11 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function July_11_ScrollRight(){ | ||
+ | |||
+ | var scrollLenth=$("#July_11 .img_total").outerWidth(); | ||
+ | $("#July_11 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ | ||
+ | $("#July_11 .img_total .scroll").append($("#July_11 .img_total .scroll img:first")); | ||
+ | $("#July_11 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | //July_26 | ||
+ | function July_26_ScrollLeft(){ | ||
+ | |||
+ | var scrollLenth=$("#July_26 .img_total").outerWidth(); | ||
+ | $("#July_26 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ | ||
+ | $("#July_26 .img_total .scroll").prepend($("#July_26 .img_total .scroll img:last")); | ||
+ | $("#July_26 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function July_26_ScrollRight(){ | ||
+ | |||
+ | var scrollLenth=$("#July_26 .img_total").outerWidth(); | ||
+ | $("#July_26 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ | ||
+ | $("#July_26 .img_total .scroll").append($("#July_26 .img_total .scroll img:first")); | ||
+ | $("#July_26 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | //July_29 | ||
+ | function July_29_ScrollLeft(){ | ||
+ | |||
+ | var scrollLenth=$("#July_29 .img_total").outerWidth(); | ||
+ | $("#July_29 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ | ||
+ | $("#July_29 .img_total .scroll").prepend($("#July_29 .img_total .scroll img:last")); | ||
+ | $("#July_29 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function July_29_ScrollRight(){ | ||
+ | |||
+ | var scrollLenth=$("#July_29 .img_total").outerWidth(); | ||
+ | $("#July_29 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ | ||
+ | $("#July_29 .img_total .scroll").append($("#July_29 .img_total .scroll img:first")); | ||
+ | $("#July_29 .img_total .scroll").css({"left":-scrollLenth}); | ||
+ | }); | ||
+ | |||
+ | } |
Latest revision as of 07:07, 18 September 2017
/*自定义Human Practices效果*/ $(function(){
$(".header .nav .mainnav").eq(4).hover(function(){ $(".header .nav .Human_Practices span").css("color","#FAEE0D"); },function(){ $(".header .nav .Human_Practices span").css("color","#FAEE0D"); });
});
/*Content_nav*/ $(function(){
var bannerHeight=$(".SSTi-SZGD").outerHeight()-$(window).scrollTop();
if(bannerHeight<=0){ $(".Content_nav").css({"position":"fixed","top":"10px"}); }else{ $(".Content_nav").css({"position":"absolute","top":"auto"}); }
$(window).scroll(function(){
var bannerHeight=$(".SSTi-SZGD").outerHeight()-$(window).scrollTop();
if(bannerHeight<=0){ $(".Content_nav").css({"position":"fixed","top":"10px"}); }else{ $(".Content_nav").css({"position":"absolute","top":"auto"}); }
});
/*锚链接跳转滑动*/ $('.Content_nav ul li a').click(function(){ $('html, body').animate({ scrollTop: $( $.attr(this, 'href') ).offset().top }, 500); return false; });
});
/*轮播*/
$(function(){
//public var scrollLenth=$(".Content .img_total").outerWidth(); $(".Content .img_total .scroll").css("left",-scrollLenth);
//April_29 $("#April_29 .img_total").hover(function(){
clearInterval(April_29_Time); $("#April_29 .img_total .icon_left").css("display","block"); $("#April_29 .img_total .icon_right").css("display","block");
},function(){
$("#April_29 .img_total .icon_left").css("display","none"); $("#April_29 .img_total .icon_right").css("display","none"); April_29_Time=setInterval("April_29_ScrollRight()",3000);
});
$("#April_29 .img_total .icon_left").click(function(){ April_29_ScrollLeft(); });
$("#April_29 .img_total .icon_right").click(function(){ April_29_ScrollRight(); });
//June_22 $("#June_22 .img_total").hover(function(){
clearInterval(June_22_Time); $("#June_22 .img_total .icon_left").css("display","block"); $("#June_22 .img_total .icon_right").css("display","block");
},function(){
$("#June_22 .img_total .icon_left").css("display","none"); $("#June_22 .img_total .icon_right").css("display","none"); June_22_Time=setInterval("June_22_ScrollRight()",3000);
});
$("#June_22 .img_total .icon_left").click(function(){ June_22_ScrollLeft(); });
$("#June_22 .img_total .icon_right").click(function(){ June_22_ScrollRight(); });
//July_11 $("#July_11 .img_total").hover(function(){
clearInterval(July_11_Time); $("#July_11 .img_total .icon_left").css("display","block"); $("#July_11 .img_total .icon_right").css("display","block");
},function(){
$("#July_11 .img_total .icon_left").css("display","none"); $("#July_11 .img_total .icon_right").css("display","none"); July_11_Time=setInterval("July_11_ScrollRight()",3000);
});
$("#July_11 .img_total .icon_left").click(function(){ July_11_ScrollLeft(); });
$("#July_11 .img_total .icon_right").click(function(){ July_11_ScrollRight(); });
//July_26 $("#July_26 .img_total").hover(function(){
clearInterval(July_26_Time); $("#July_26 .img_total .icon_left").css("display","block"); $("#July_26 .img_total .icon_right").css("display","block");
},function(){
$("#July_26 .img_total .icon_left").css("display","none"); $("#July_26 .img_total .icon_right").css("display","none"); July_26_Time=setInterval("July_26_ScrollRight()",3000);
});
$("#July_26 .img_total .icon_left").click(function(){ July_26_ScrollLeft(); });
$("#July_26 .img_total .icon_right").click(function(){ July_26_ScrollRight(); });
//July_29 $("#July_29 .img_total").hover(function(){
clearInterval(July_29_Time); $("#July_29 .img_total .icon_left").css("display","block"); $("#July_29 .img_total .icon_right").css("display","block");
},function(){
$("#July_29 .img_total .icon_left").css("display","none"); $("#July_29 .img_total .icon_right").css("display","none"); July_29_Time=setInterval("July_29_ScrollRight()",3000);
});
$("#July_29 .img_total .icon_left").click(function(){ July_29_ScrollLeft(); });
$("#July_29 .img_total .icon_right").click(function(){ July_29_ScrollRight(); });
});
var April_29_Time=setInterval("April_29_ScrollRight()",3000); var June_22_Time=setInterval("June_22_ScrollRight()",3000); var July_11_Time=setInterval("July_11_ScrollRight()",3000); var July_26_Time=setInterval("July_26_ScrollRight()",3000); var July_29_Time=setInterval("July_29_ScrollRight()",3000);
//April_29 function April_29_ScrollLeft(){
var scrollLenth=$("#April_29 .img_total").outerWidth(); $("#April_29 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ $("#April_29 .img_total .scroll").prepend($("#April_29 .img_total .scroll img:last")); $("#April_29 .img_total .scroll").css({"left":-scrollLenth}); });
}
function April_29_ScrollRight(){
var scrollLenth=$("#April_29 .img_total").outerWidth(); $("#April_29 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ $("#April_29 .img_total .scroll").append($("#April_29 .img_total .scroll img:first")); $("#April_29 .img_total .scroll").css({"left":-scrollLenth}); });
}
//June_22 function June_22_ScrollLeft(){
var scrollLenth=$("#June_22 .img_total").outerWidth(); $("#June_22 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ $("#June_22 .img_total .scroll").prepend($("#June_22 .img_total .scroll img:last")); $("#June_22 .img_total .scroll").css({"left":-scrollLenth}); });
}
function June_22_ScrollRight(){
var scrollLenth=$("#June_22 .img_total").outerWidth(); $("#June_22 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ $("#June_22 .img_total .scroll").append($("#June_22 .img_total .scroll img:first")); $("#June_22 .img_total .scroll").css({"left":-scrollLenth}); });
}
//July_11 function July_11_ScrollLeft(){
var scrollLenth=$("#July_11 .img_total").outerWidth(); $("#July_11 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ $("#July_11 .img_total .scroll").prepend($("#July_11 .img_total .scroll img:last")); $("#July_11 .img_total .scroll").css({"left":-scrollLenth}); });
}
function July_11_ScrollRight(){
var scrollLenth=$("#July_11 .img_total").outerWidth(); $("#July_11 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ $("#July_11 .img_total .scroll").append($("#July_11 .img_total .scroll img:first")); $("#July_11 .img_total .scroll").css({"left":-scrollLenth}); });
}
//July_26 function July_26_ScrollLeft(){
var scrollLenth=$("#July_26 .img_total").outerWidth(); $("#July_26 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ $("#July_26 .img_total .scroll").prepend($("#July_26 .img_total .scroll img:last")); $("#July_26 .img_total .scroll").css({"left":-scrollLenth}); });
}
function July_26_ScrollRight(){
var scrollLenth=$("#July_26 .img_total").outerWidth(); $("#July_26 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ $("#July_26 .img_total .scroll").append($("#July_26 .img_total .scroll img:first")); $("#July_26 .img_total .scroll").css({"left":-scrollLenth}); });
}
//July_29 function July_29_ScrollLeft(){
var scrollLenth=$("#July_29 .img_total").outerWidth(); $("#July_29 .img_total .scroll").stop().animate({"left":"0px"},500,function(){ $("#July_29 .img_total .scroll").prepend($("#July_29 .img_total .scroll img:last")); $("#July_29 .img_total .scroll").css({"left":-scrollLenth}); });
}
function July_29_ScrollRight(){
var scrollLenth=$("#July_29 .img_total").outerWidth(); $("#July_29 .img_total .scroll").stop().animate({"left":-scrollLenth*2},500,function(){ $("#July_29 .img_total .scroll").append($("#July_29 .img_total .scroll img:first")); $("#July_29 .img_total .scroll").css({"left":-scrollLenth}); });
}