more.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. $(function(){
  2. var wait_load = $('.im');
  3. wait_load.css({"opacity":0});
  4. $(window).on("scroll",function(){
  5. setTimeout(function(){
  6. for (var i = 0; i < wait_load.length; i ++) {
  7. var _this = wait_load.eq(i);
  8. if (($(window).height() + $(window).scrollTop()) >= _this.offset().top) {
  9. $(_this).attr('src', $(_this).attr('xsrc')).animate({
  10. "opacity":1
  11. });
  12. }
  13. }
  14. },100)
  15. })
  16. })
  17. $(function(){
  18. var len = $(".bd li").length;
  19. var index = 0;
  20. var adTimer;
  21. $(".bd li").mouseover(function(){
  22. index = $(".banner .bd li").index(this);
  23. showImg(index);
  24. }).eq(0).mouseover();
  25. $('.banner').hover(function(){
  26. clearInterval(adTimer);
  27. },function(){
  28. adTimer = setInterval(function(){
  29. showImg(index)
  30. index++;
  31. if(index==len){index=0;}
  32. } , 3000);
  33. }).trigger("mouseleave");
  34. $(".sv li.next").click(function(){
  35. index++;
  36. showImg(index);
  37. if(index==len){index=0;
  38. showImg(index);
  39. }
  40. });
  41. $(".sv li.prev").click(function(){
  42. if(index==0){index=$(".bd li").length;
  43. showImg(index);
  44. }
  45. index--;
  46. showImg(index);
  47. })
  48. })
  49. function showImg(index){
  50. var adLeft = $(".banner").height();
  51. $(".nno").stop(true,false).animate({top : -adLeft*index},1000)
  52. $(".bd li").removeClass("on")
  53. .eq(index).addClass("on");
  54. }
  55. $(function(){
  56. var lend = $(".ciu li").length;//获取总长度
  57. var index2 = 0;//初始化
  58. var adTimer2;//初始化
  59. $(".ciu li").mouseover(function(){
  60. index2 = $(".ciu li").index(this);
  61. show2Img(index2);
  62. }).eq(0).mouseover();
  63. //滑入 停止动画,滑出开始动画.
  64. $('.biu').hover(function(){
  65. clearInterval(adTimer2);
  66. },function(){
  67. adTimer2 = setInterval(function(){
  68. show2Img(index2)
  69. index2++;
  70. if(index2==lend){index2=0;}
  71. } , 2000);
  72. }).trigger("mouseleave");
  73. })
  74. function show2Img(index){
  75. var adHeight = $(".ipc li").width();
  76. $(".ipc ul").stop(true,false).animate({"left" : -adHeight*index},600);
  77. $(".ciu li").removeClass("on")
  78. .eq(index).addClass("on");
  79. }
  80. $(function(){
  81. $(".hdi div").click(function(){
  82. var ind=$(this).index()
  83. $(".bdd ul").removeClass("on").eq(ind).addClass("on");
  84. $(this).addClass("on").siblings().removeClass("on")
  85. })
  86. })
  87. $(function(){
  88. $(".div_frn_ji ul li").hover(function(){
  89. var ni=$(this).index();
  90. $(".uuyz ul").removeClass(".onz").eq(ni).addClass(".onz")
  91. })
  92. })
  93. $(function(){
  94. $(".navqq li").click(function(){
  95. var nzi=$(this).index()-1;
  96. $(".mid_08_tz ul").removeClass(".ovu").eq(nzi).addClass(".ovu");
  97. $(this).addClass("ol").siblings().removeClass("ol")
  98. })
  99. })
  100. $(function(){
  101. var ijn=parseInt($(".cvg span").html());
  102. var wid=$(".jjea").width();
  103. var paged = 1;
  104. $(".hiu").width(ijn*wid);
  105. $(".nxt").click(function(){
  106. var hiu=$(".hiu");
  107. var jjea=$(".jjea");
  108. var wid=jjea.width();
  109. if( !hiu.is(":animated") ){
  110. if( paged == ijn){
  111. hiu.animate({ left : '0px'}, "slow");
  112. paged = 1;
  113. }else{
  114. hiu.animate({ left : '-='+wid }, "slow");
  115. paged++;
  116. }
  117. }
  118. })
  119. $(".prv").click(function(){
  120. var hiu=$(".hiu");
  121. var jjea=$(".jjea");
  122. var wid=jjea.width();
  123. if( !hiu.is(":animated") ){
  124. if( paged == 1){
  125. hiu.animate({ left : '-='+wid*(ijn-1)}, "slow");
  126. paged = ijn;
  127. }else{
  128. hiu.animate({ left : '+='+wid }, "slow");
  129. paged--;
  130. }
  131. }
  132. })
  133. })
  134. $(function(){
  135. $(".nnqqv li").click(function(){
  136. $(".iiggv").val($(this).html()+$(".iiggv").val())
  137. })
  138. })
  139. $(function(){
  140. $(".ivy_ooz li").hover(function(){
  141. $(this).addClass("oovvz").siblings().removeClass("oovvz");
  142. })
  143. })
  144. $(function() {
  145. var oul = $('.hhyc ul');
  146. var oulHtml = oul.html();
  147. oul.html(oulHtml + oulHtml)
  148. var timeId = null;
  149. var ali = $('.hhyc ul li');
  150. var aliWidth = ali.eq(0).height();
  151. var aliSize = ali.size();
  152. var ulWidth = aliWidth * aliSize;
  153. oul.height(ulWidth); //1600px
  154. var speed = 2;
  155. function slider() {
  156. if (speed > 0) {
  157. if (oul.css('top') == -ulWidth/2+"px") {
  158. oul.css('top', 0);
  159. }
  160. oul.css('top', '-=' + speed + 'px');
  161. }
  162. }
  163. timeId = setInterval(slider, 30);
  164. $('.hhyc').mouseover(function() {
  165. clearInterval(timeId);
  166. });
  167. $('.hhyc').mouseout(function() {
  168. timeId = setInterval(slider, 30);
  169. });
  170. });
  171. $(function(){
  172. var TextNum2;
  173. $(".ckoz,.up").click(function () {
  174. $(".anoz .up").hide();
  175. $(".anoz .down").show();
  176. if(!flag){
  177. flag=true;
  178. reset();
  179. letGo();
  180. setTimeout(function () {
  181. flag=false;
  182. if(index==2){
  183. $(".anoz .up").show();
  184. $(".anoz .down").hide();
  185. setTimeout(redshow,1500)
  186. function redshow(){
  187. $(".hhi").show();
  188. }
  189. }else{
  190. $(".anoz .up").show();
  191. $(".anoz .down").hide();
  192. setTimeout(redshow,1500)
  193. function redshow(){
  194. $(".hhi").show();
  195. }
  196. }
  197. },3000);
  198. index++;
  199. }
  200. });
  201. var flag=false;
  202. var index=0;
  203. var linum = $(".opz ul li").length/2;
  204. var a=-1140;
  205. var arr=[];
  206. for(var i=0;i<linum;i++){
  207. a-=114;
  208. arr.push(a)
  209. }
  210. function letGo(){
  211. TextNum2=parseInt(Math.random()*linum);
  212. var num2 = arr[TextNum2];
  213. $(".opz").animate({"top":-1256},1000,"linear", function () {
  214. $(this).css("top",0).animate({"top":num2},1800,"linear");
  215. });
  216. }
  217. function reset(){
  218. $(".opz").css({"top":-456});
  219. }
  220. })