PageSourceSearch

http://cnlingshan.com/templates/main/js/jqslider.js

js cnlingshan.com collected 2026-10-09 00:53:49 UTC 3,090 bytes, 71 lines download raw bytes

1$.fn.jqslider = function() {
2    var fun = function(parentObj){
3        var picTotal = parentObj.find('.list-box li').length; //总共几张
4        var currentIndex = 0; // 当前要显示的索引
5        var toDisplayPicNumber = 1; // 定时器下一次执行用到的索引
6        var timer = null; // 定时器对象
7        var hideIndex = 0; // 要隐藏的索引
8        var iTime = 6000; // 间隔时间
9
10        //插入HTML代码
11        var speedHtml = '<div class="speed-box"><div class="speed-btn">';
12        for(var i=0; i<picTotal; i++){
13            speedHtml += '<a href="javascript:;"></a>';
14        }
15        speedHtml += '</div></div>';
16        $(speedHtml).appendTo(parentObj); //插入进度按钮
17        $('<a class="prev-btn" href="javascript:;"></a><a class="next-btn" href="javascript:;"></a>').appendTo(parentObj); //插入左右按钮
18        parentObj.find('.list-box li').eq(0).css({'opacity':1,'z-index':2});
19        parentObj.find('.speed-btn a').eq(0).addClass('selected');
20        
21        //移上移下显示隐藏
22        parentObj.hover(function(){
23        	clearTimeout(timer);
24            parentObj.find('.prev-btn').show();
25            parentObj.find('.next-btn').show();
26        },function(){
27        	parentObj.find('.prev-btn').hide();
28            parentObj.find('.next-btn').hide();
29        	timer = setTimeout(PicNumClick, iTime);
30        	//离开从新赋值
31        	toDisplayPicNumber = (currentIndex + 1 == picTotal ? 0 : currentIndex + 1);
32        });
33        //下一个
34        parentObj.find('.next-btn').click(function(){
35        	currentIndex = (currentIndex + 1 == picTotal ? 0 : currentIndex + 1); 
36        	DisplayPic();
37        });
38        //上一个
39        parentObj.find('.prev-btn').click(function(){
40        	currentIndex = (currentIndex - 1 < 0 ? picTotal-1 : currentIndex -1); 
41        	DisplayPic();
42        });
43        //中间按钮
44        parentObj.find('.speed-btn a').click(function(){
45        	currentIndex = $(this).index();
46        	DisplayPic();
47        });
48        
49        //图片切换效果
50        function DisplayPic() {
51            clearTimeout(timer);
52			if(currentIndex == hideIndex){return;}
53            parentObj.find('.list-box li').eq(currentIndex).css({'opacity':1,'z-index':2});
54            parentObj.find('.list-box li').eq(hideIndex).css({'z-index':5}).stop(true,true).animate({'opacity':0}, 300 , function(){
55            	hideIndex = currentIndex;
56            	$(this).css({'z-index':1});
57            });
58            parentObj.find('.speed-btn a').eq(currentIndex).addClass('selected').siblings().removeClass('selected');
59        }
60        //循环调用自身
61        function PicNumClick() {
62            parentObj.find(".speed-btn a").eq(toDisplayPicNumber).trigger("click");
63            toDisplayPicNumber = (toDisplayPicNumber + 1) % picTotal;
64            timer = setTimeout(PicNumClick,iTime);
65        }
66        setTimeout(PicNumClick, iTime);
67	};
68	return $(this).each(function() {
69		fun($(this));						 
70	});
71}

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.