PageSourceSearch

https://www.jwview.com/jingwei/2017js/index1.js?v=20230104

js jwview.com collected 2026-10-02 05:30:52 UTC 5,706 bytes, 192 lines download raw bytes

1// JavaScript Document
2// focus 
3
4function focusBox(o){
5
6	if(!o) return;
7	var w=700, $o=$('#'+o),i=0,l=0;arr= [],t= null,
8		$infoLi = $o.find('.banner_info li'), len= $infoLi.length*2,
9		$ul=$o.find('.banner_pic>ul');
10	$ul.append($ul.html()).css({'width':len*w, 'left': -len*w/2});
11	$infoLi.eq(0).addClass('current');
12	//add banner_pages element
13	arr.push('<div class="banner_pages"><ul>');
14	$infoLi.each(function(i){
15		if(i==0){
16			arr.push('<li class="current"><span>'+ (i+1) +'</span></li>');
17		}else{
18			arr.push('<li><span>'+ (i+1) +'</span></li>');
19		}
20	});
21	arr.push('</ul></div>');
22	$o.append(arr.join(''));
23	var $pagesLi = $o.find('.banner_pages li');
24	//mouse
25	$pagesLi.children('span').click(function(){
26		var p = $pagesLi.index($o.find('.banner_pages li.current'));
27		i = $pagesLi.children('span').index($(this));
28		if(i==p) return;
29		l = parseInt($ul.css('left')) + w*(p-i);
30		addCurrent(i,l);
31		return false;
32	})
33	$o.children('a.btn_prev').click(function(){
34		i = $pagesLi.index($o.find('.banner_pages li.current'));
35		(i==0)? i=(len/2-1):i--;
36		l = parseInt($ul.css('left')) + w;
37		addCurrent(i,l);
38		return false;
39	})
40	$o.children('a.btn_next').click(function(){
41		i = ($pagesLi.index($o.find('.banner_pages li.current'))+1)%(len/2);
42		l = parseInt($ul.css('left')) - w;
43		addCurrent(i,l);
44		return false;
45	})
46	//auto focus
47	t = setInterval(init,8000);
48	$o.hover(function(){
49		clearInterval(t);
50	}, function(){
51		t = setInterval(init,8000);
52	});
53	function init(){
54		$o.children('a.btn_next').trigger('click');
55	}
56	//add focus
57	function addCurrent(i,l){
58		if($ul.is(':animated')) return;
59		$ul.animate({'left':l},500,function(){
60			$o.children('.banner_count').text(i+1);
61			$infoLi.not($infoLi.eq(i).addClass('current')).removeClass('current');
62			$pagesLi.not($pagesLi.eq(i).addClass('current')).removeClass('current');
63			if(l== (1-len)*w){
64				$ul.css({'left': (1-len/2)*w});
65			}else if(l== 0){
66				$ul.css({'left': -len*w/2});
67			}
68		});
69	}
70}
71
72$(function(){
73	focusBox('kakaFocus');
74})
75
76$(document).ready(function(){
77	$("#kakaFocus").mouseover(function(){
78		$("#lrbt_show1").show();
79	    $("#lrbt_show2").show();
80		});
81         $("#kakaFocus").mouseout(function(){
82	  	$("#lrbt_show1").hide();
83		$("#lrbt_show2").hide();
84		});
85
86	$("#kakaFocus2").mouseout(function(){
87	  	$("#lrbt_show1").hide();
88		$("#lrbt_show2").hide();
89		});
90	});
91
92//7X24
93$(function () { 
94var scrollTimer = null; 
95var delay2 = 2000; 
96//1.Êó±ê¶ÔÐÂÎÅ´¥·¢mouseoutʼþºóÿ2sµ÷ÓÃscrollNews() 
97//2.Êó±ê¶ÔÐÂÎÅ´¥·¢mouseoverʼþºóÍ£Ö¹µ÷ÓÃscrollNews() 
98//3.³õ´Î¼ÓÔØÒ³Ãæ´¥·¢Êó±ê¶ÔÐÂÎŵÄmouseoutʼþ 
99$('div.scrollNews').hover(function () { 
100clearInterval(scrollTimer); 
101}, function () { 
102scrollTimer = setInterval(function () { 
103scrollNews(); 
104}, delay2); 
105}).triggerHandler('mouseout'); 
106}); 
107//¹ö¶¯ÐÂÎÅ 
108function scrollNews() { 
109var $news = $('div.scrollNews>ul'); 
110var $lineHeight = $news.find('li:first').height(); 
111$news.animate({ 'marginTop': -$lineHeight + 'px' }, 600, function () { 
112$news.css({ margin: 0 }).find('li:first').appendTo($news); 
113}); 
114} 
115
116//backtop
117
118$(function() {
119
120	backToTopFun1 = function() {
121        var stback = $(document).scrollTop(), winh1 = $(window).height();
122       (stback>0)? $("#newsbacktop").css('display','block'): $("#newsbacktop").css('display','none');  
123        //IE6ÏµĶ¨Î»
124
125        if(reachBottom() == true){
126			//alert(reachBottom());
127			document.getElementById("menu").className = "menuBtm";
128        }else{
129			//alert(00);
130			document.getElementById("menu").className = "menuTop";
131        }
132
133    };
134	$(window).bind("scroll", backToTopFun1);
135    backToTopFun1(); 
136
137  var li = document.getElementById("menu").getElementsByTagName("li");
138
139    for(var i = 0; i<li.length; i++){
140       li[i].onclick = function(){
141           for(var i = 0; i<li.length; i++){
142                li[i].className = li[i].className.replace("current","");
143           }
144           this.className += "current";
145           }
146       }
147});
148
149 // var testtest=function(id){return document.getElementById(id);}
150
151var isIE = !!window.ActiveXObject;  
152var isIE6 = isIE && !window.XMLHttpRequest;
153function reachBottom() {
154
155        var btmHeight = "227";// ÕâÀïÅäÖÃÔªËØ¾àÒ³Ãæµ×²¿µÄ¾àÀë
156        var scrollTop = 0;
157        var clientHeight = 0;
158        var scrollHeight = 0;
159        if (document.documentElement && document.documentElement.scrollTop) {
160
161            scrollTop = document.documentElement.scrollTop;
162
163        } else if (document.body) {
164            scrollTop = document.body.scrollTop;
165        }
166        if (document.body.clientHeight && document.documentElement.clientHeight) {
167            clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight: document.documentElement.clientHeight;
168        } else {
169            clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight: document.documentElement.clientHeight;
170        }
171        scrollHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
172
173		 if(scrollTop<="227"){
174		   $("#menu li").removeClass("current");
175		   }
176
177  if (scrollTop>=btmHeight) {
178if(isIE6){
179	     document.getElementById("menu").style.top=(scrollTop)+"px";
180}else{
181                document.getElementById("menu").style.top="0px";
182}
183            return true;
184        } else {
185if(isIE6){
186          document.getElementById("menu").style.top="227"+"px";
187}else{
188           document.getElementById("menu").style.top=("227"-scrollTop)+"px";
189}
190           return false;
191        }
192    }

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.