PageSourceSearch

https://linyutang.org.tw/big5/js/scrollad.js

js linyutang.org.tw collected 2026-10-02 18:20:12 UTC 2,326 bytes, 86 lines download raw bytes

1// JavaScript Document
2
3// 當網頁載入完
4	$(window).load(function(){		
5							
6		var $win = $(window),
7			$ad = $('#img_1').css('opacity', 0).show(),	// 讓廣告區塊變透明且顯示出來
8			$ad2 = $('#img_2').css('opacity', 0).show(),	// 讓廣告區塊變透明且顯示出來
9			
10			_width = $ad.width(),
11			_height = $ad.height(),
12			_diffY = 250,
13			//_diffX = 12,	// 距離左及上方邊距
14			//_diffY = document.getElementById("pxy").offsetTop + 60,
15			_moveSpeed = 1;	// 移動的速度
16		
17		// 先把 #abgne_float_ad 移動到定點
18		$ad.css({
19			top: _diffY,	// 往上
20			//left:  _diffX,	// 往左
21			opacity: 1
22		});
23		
24		$ad2.css({
25			top: _diffY,	// 往上
26			//left:  _diffX,	// 往左
27			opacity: 1
28		});
29		
30		// 幫網頁加上 scroll 及 resize 事件
31		$win.bind('scroll resize', function(){
32			
33			var $this = $(this);
34			
35			if(navigator.appName == "Microsoft Internet Explorer"){ 
36			
37			    if( document.documentElement.scrollTop < 350){				   
38				 	 _diffY = 250 ;	
39					 
40					 $ad.css({top: 250,position: 'absolute'});
41					 $ad2.css({top: 250,position: 'absolute'});
42						 
43				}else{		
44				    _diffY = 5 + document.documentElement.scrollTop;	
45				    $ad.css({top: 50,position: 'fixed'});
46					$ad2.css({top: 50,position: 'fixed'});
47				  				
48				}	
49			}else{				
50			   if( document.body.scrollTop < 250){				   
51				   _diffY = 250 - document.documentElement.scrollTop;			
52				   
53				     $ad.css({top: 250,	position: 'absolute'});
54					 $ad2.css({top: 250, position: 'absolute'});
55					 
56				}else{					
57				   _diffY = 1;		
58				   
59				   $ad.css({top: 50,position: 'fixed'});
60				   $ad2.css({top: 50,position: 'fixed'});
61				}	
62			}
63		 
64		 		//document.form1.txt1.value = document.getElementById("pxy").offsetTop;
65			//	document.form1.txt1.value = document.body.scrollTop;
66			// 控制 #abgne_float_ad 的移動
67			
68			//$ad.stop().animate({	
69				
70			//	top: $this.scrollTop() + _diffY,	// 往上
71			//	left: $this.scrollLeft() + _diffX	// 往左
72			//}, _moveSpeed);
73			
74			//$ad2.stop().animate({	
75				
76			//	top: $this.scrollTop() + _diffY,	// 往上
77			//	left: $this.scrollLeft() + _diffX	// 往左
78			//}, _moveSpeed);
79			
80			
81		}).scroll();	// 觸發一次 scroll()
82		
83		
84		
85	});
86	

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.