PageSourceSearch

http://www.gcmag.cn/web/wap/js/index.js

js gcmag.cn collected 2026-10-02 12:24:43 UTC 4,370 bytes, 149 lines download raw bytes

1$(function(){
2	// ҳͷbanner¹ö¶¯
3	new Swipe(document.getElementById('topBanner'), {
4		speed:500,
5		auto:3000,
6		callback: function(){
7			var lis = $(this.element).next("ol").children();
8			lis.removeClass("on").eq(this.index).addClass("on");
9		}
10	});
11	$(".bannerBox ol li").first().addClass("on");
12});
13
14
15// ×îС¢ÈÈÃÅ¡¢ÍƼö 3Áбí
16var newsTabs = function() {
17	var init = function() {
18		// չʾÁбí
19		$("#newsListTab1").show();
20		$("#newsListTab1_more").show();
21
22		var root = $("#newsTabsBox");
23		var pageno = 1;
24		var pageno_newsListNoBox = 1;
25		var pageno_newsListTab1 = 1;
26		var pageno_newsListTab2 = 1;
27		var pageno_newsListTab3 = 1;
28
29		root.find(".moreBox").click(function() {
30			var moreid = $(this).attr('id');
31			var listid = moreid.replace("_more",""); 
32			var loadid = moreid.replace("_more","_load"); 
33			var ulid = moreid.replace("_more","_comul"); 
34			$("#" + moreid).hide();
35			$("#" + loadid).show();
36
37			if(listid=='newsListNoBox'){
38				pageno_newsListNoBox = parseInt(pageno_newsListNoBox) + 1;
39				pageno = pageno_newsListNoBox;
40			}
41			else if(listid=='newsListTab1'){
42				pageno_newsListTab1 = parseInt(pageno_newsListTab1) + 1;
43				pageno = pageno_newsListTab1;
44			}
45			else if(listid=='newsListTab2'){
46				pageno_newsListTab2 = parseInt(pageno_newsListTab2) + 1;
47				pageno = pageno_newsListTab2;
48			}
49			else if(listid=='newsListTab3'){
50				pageno_newsListTab3 = parseInt(pageno_newsListTab3) + 1;
51				pageno = pageno_newsListTab3;
52			}
53		});
54		
55		$('.newsTabsItem').click(function() {
56			var id = $(this).data('id');
57			if (id == 1) {
58				$("#newsListNoBox").hide();
59				$("#newsListNoBox_more").hide();
60				$("#newsListTab2").hide();
61				$("#newsListTab2_more").hide();
62				$("#newsListTab3").hide();
63				$("#newsListTab3_more").hide();
64				$("#newsListTab1").show();
65				$("#1").addClass("current");
66				$("#2").removeClass("current");
67				$("#3").removeClass("current");
68			} else if (id == 2) {
69				$("#newsListNoBox").hide();
70				$("#newsListNoBox_more").hide();
71				$("#newsListTab1").hide();
72				$("#newsListTab1_more").hide();
73				$("#newsListTab3").hide();
74				$("#newsListTab3_more").hide();
75				$("#newsListTab2").show();
76				$("#newsListTab2_more").show();
77				$("#1").removeClass("current");
78				$("#2").addClass("current");
79				$("#3").removeClass("current");
80			} else {
81				$("#newsListNoBox").hide();
82				$("#newsListNoBox_more").hide();
83				$("#newsListTab1").hide();
84				$("#newsListTab1_more").hide();
85				$("#newsListTab2").hide();
86				$("#newsListTab2_more").hide();
87				$("#newsListTab3").show();
88				$("#newsListTab3_more").show();
89				$("#1").removeClass("current");
90				$("#2").removeClass("current");
91				$("#3").addClass("current");
92			}
93		})
94	};
95
96	var addh3class = function() {
97		for (var i = 0, l = $(".newsTitle").length; i < l; i++) {
98			var newsEle = $(".newsTitle").eq(i), j = 0;
99			if (newsEle.children(".top").length) {
100				j++;
101			}
102			if (newsEle.children(".newsImg").length) {
103				j++;
104			}
105			switch (j) {
106				case 1 :
107					newsEle.addClass("titleOne");
108					break;
109				case 2 :
110					newsEle.addClass("titleTwo");
111					break;
112				default :
113					break;
114			}
115		}
116	};
117
118	var showPlane_zong = function() {
119		var cateCount = $(".newsTabStyle3").find('div').length;
120		if(cateCount=='1'){
121			if($(".newsTabStyle3").find('div')[0].id=='new'){
122				$("#showlist1").html($("#newsListNoBox_div").html());
123			}else{
124				$("#showlist1").html($("#newsListTab1_div").html());
125			}
126		}
127		if(cateCount=='2'){
128			if($(".newsTabStyle3").find('div')[0].id=='new'){
129				$("#showlist1").html($("#newsListNoBox_div").html());
130				$("#showlist2").html($("#newsListTab1_div").html());
131			}else{
132				$("#showlist1").html($("#newsListTab1_div").html());
133				$("#showlist2").html($("#newsListTab2_div").html());
134			}
135		}
136		if(cateCount=='3'){
137			if($(".newsTabStyle3").find('div')[0].id=='new'){
138				$("#showlist1").html($("#newsListNoBox_div").html());
139				$("#showlist2").html($("#newsListTab1_div").html());
140				$("#showlist3").html($("#newsListTab2_div").html());
141			}else{
142				$("#showlist1").html($("#newsListTab1_div").html());
143				$("#showlist2").html($("#newsListTab2_div").html());
144				$("#showlist3").html($("#newsListTab3_div").html());
145			}
146		}
147	};
148	return { init : init }
149}();

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.