PageSourceSearch

http://www.saffronhenderson.com/mskin/js/scroll.js

js saffronhenderson.com collected 2026-09-27 13:04:32 UTC 1,688 bytes, 44 lines download raw bytes

1
2// function reurl(){ 
3// 	   url = location.href;var times = url.split("?"); 
4// 	   if(times[1] != 1){url += "?1"; self.location.replace(url);} 
5// }
6//  onload=reurl ;
7
8
9$(document).ready(function () {
10    var box0 = $(".one"),v0 = 0.5; //这里添加滚动的对象和其速率
11	var box1 = $(".two"),v1 = 1;
12	Rin(box0,v0);
13	Rin(box1,v1); 
14
15		 function Rin($Box,v){//$Box移动的对象,v对象移动的速率
16           var $Box_ul = $Box.find("ul"),
17               $Box_li = $Box_ul.find("li"),
18               $Box_li_span = $Box_li.find("span"),
19	           left = 0,
20	           s=0,
21	           timer;//定时器
22
23			      $Box_li.each(function(index){
24			       $($Box_li_span[index]).width($(this).width());//hover
25                   s += $(this).outerWidth(true); //即要滚动的长度
26			     })
27			      
28		window.requestAnimationFrame = window.requestAnimationFrame||function(Tmove){return setTimeout(Tmove,1000/60)};
29	    window.cancelAnimationFrame = window.cancelAnimationFrame||clearTimeout;
30			      
31                  if( s>=$Box.width()){//如果滚动长度超出Box长度即开始滚动,没有的话就不执行滚动
32                           $Box_li.clone(true).appendTo($Box_ul);                       
33					       Tmove();
34						      function Tmove(){
35						           //运动是移动left  从0到-s;(个人习惯往左滚)
36						           left -= v;
37						           if(left <= -s){left = 0;$Box_ul.css("left",left)}else{ $Box_ul.css("left",left) }
38					                   timer = requestAnimationFrame(Tmove);   
39						      }
40					    $Box_ul.hover(function(){cancelAnimationFrame(timer)},function(){Tmove()})    
41		          }  
42 
43	} 	 	
44}) 	

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.