PageSourceSearch

https://www.hzfb.com/en/bocweb/web/js/banner.js?v=v1

js hzfb.com collected 2026-10-05 08:17:02 UTC 1,918 bytes, 78 lines download raw bytes

1$(function(){
2	var n = $(".banner li").length
3	$(".banner li").each(function(){
4		var _this = $(this),
5			src = _this.attr("data-img"),
6			img = new Image();
7		img.src = src;
8		//处理ff下会自动读取缓存图片
9		if(img.complete || img.width){
10			_this.attr("style","background:url("+src+") no-repeat center");
11			n -- ;
12			if(n == 0){
13				banner();
14			}
15		    return;
16		}
17		$(img).load(function(){
18			_this.attr("style","background:url("+src+") no-repeat center");
19			n -- ;
20			if(n == 0){
21				banner();
22			}
23		});
24	})
25})
26function banner(){
27	//初始化banner样式
28	var listN = $(".banner li").length;
29	$(".loader").stop().fadeOut(1000);
30	$(".banner li").eq(0).fadeIn(1000);
31	for (var i = 0; i < listN; i++) {
32		$(".banner .btns").prepend('<span class="span'+i+' fl"></span>');
33	};
34	$(".banner .btns").css("margin-left",-$(".btns").width()/2);
35	$(".banner .btns span").eq(0).addClass("cur");
36	
37
38	// 执行效果
39	var sw = 1;
40	$(".banner .btns span").mouseover(function(){
41		sw = $(this).index();
42		myShow(sw);
43	});
44	function myShow(i){
45		$(".banner .btns span").eq(i).addClass("cur").siblings("span").removeClass("cur");
46		$(".banner li").eq(i).stop(true,true).fadeIn(1000).siblings().stop(true,true).fadeOut(1000);
47	}
48	$('.banner .btns .prev').on('click',function(){
49		sw=$(".banner .btns span.cur").index();
50		sw==0?sw=(listN-1):sw--;
51		console.log(sw);
52		myShow(sw);
53	})
54	$('.banner .btns .next').on('click',function(){
55		sw=$(".banner .btns span.cur").index();
56		sw==(listN-1)?sw=0:sw++;
57		myShow(sw);
58	})
59	// 滑入停止动画,滑出开始动画
60	$(".banner").hover(function(){
61		if(myTime){
62		   clearInterval(myTime);
63		}
64	},function(){
65		clearInterval(myTime);
66		myTime = setInterval(function(){
67			myShow(sw);
68			sw++;
69			if(sw == listN){sw = 0;}
70		}, 5000);
71	});
72	// 自动开始, 创建定时器
73	var myTime = setInterval(function(){
74		myShow(sw);
75		sw++;
76		if(sw == listN){sw = 0;}
77	}, 5000);
78}

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.