PageSourceSearch

https://dragonest.com/Public/Home/default/pc/js/about.js?201711231121

js dragonest.com collected 2026-10-02 13:34:25 UTC 6,407 bytes, 167 lines download raw bytes

1var page_idx = 0, //记录当前fullpage页面
2	slide_state = 0, //记录当前页面是否处于动画状态的值
3	timer1 ; //按钮点击定时器
4$(function(){	
5	var win_h = $(window).height(),
6		bg_top = $('.home_bgBox').height(),
7		zzc_top = $('.home_bgZZC').height();
8	//刷新页面滚动到顶部
9	$("body").animate({scrollTop : 0},100);
10	//刷新页面loading背景消失
11	setTimeout(function(){
12		$('.loading_zzc').hide();
13	},500);
14
15	$(window).resize(function(){
16		win_h = $(window).height(),
17		bg_top = $('.home_bgBox').height(),
18		zzc_top = $('.home_bgZZC').height();
19		$('.section,.containerBox').height(win_h);
20	})
21	$('.section,.containerBox').height(win_h);
22	//fullpage页面右上菜单按钮点击事件
23	$('.header_menuBox .menu_btn').click(function(){
24		if($(this).hasClass('active')){
25			$(this).removeClass('active');
26			$(this).siblings('.menu_list').removeClass('active');
27			$(this).siblings('.menu_list').find('.menu_line').removeClass('active');
28		}else{
29			$(this).addClass('active');
30			$(this).siblings('.menu_list').addClass('active');
31			$(this).siblings('.menu_list').find('.menu_line').addClass('active');
32		}
33	})
34	//fullpage首页向下滚动按钮点击事件
35	$('.btnDown').click(function(){
36		//设置页码
37		page_idx = 1;
38		//设置当前状态
39		slide_state = 1;
40		//执行动画
41		$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top +'px,0)'});
42		$('.section').eq(1).addClass('animate').siblings().removeClass('animate');
43		//右侧导航按钮
44		$('#fp-nav li').eq(0).find('a').addClass('active').parent().siblings().find('a').removeClass('active');
45		setTimeout(function(){
46			$('.header_scroll,.header_menuBox,#fp-nav,.border').show();
47		},500);
48		//定时改变页面状态,状态值为0才能继续滚动页面
49		clearTimeout(timer1);
50		timer1 = setTimeout(function() {
51	        slide_state = 0;
52	    }, 1500);
53	})
54	//fullpage右侧导航按钮点击事件
55	$('#fp-nav li').find('a').click(function(){
56		var i = $(this).parent().index();
57		slide_state = 1;
58		page_idx = i + 1;
59		$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top * (i + 1) +'px,0)'});
60		$('#fp-nav li').eq(i).find('a').addClass('active').parent().siblings().find('a').removeClass('active');
61		$('.section').eq(i + 1).addClass('animate').siblings().removeClass('animate');
62		clearTimeout(timer1);
63		timer1 = setTimeout(function() {
64	        slide_state = 0;
65	    }, 1500);
66	})
67	//屏幕滚动监听事件
68	$(window).scroll(function(event){
69		var scrollTop = document.documentElement.scrollTop || $('body').scrollTop(),
70			top = scrollTop / 2000 / 3,
71			opacity = 1.25,		
72			y1 = 1 + top * 6,y2 = 1 + top * 2,y3 = 1 + top * 1.22,y4 = 1 + top * 1.22,y5 = 1 + top * 0.44,
73			o = opacity - top * 3 * 7;
74		if($(document).scrollTop() > 0){
75			$('.scrollPromptBox').hide();
76		}else{
77			$('.scrollPromptBox').show();
78		}
79		//判断页面是否滚动到fullpage页面区域
80		if($(document).scrollTop() >= $(document).height() - $(window).height()){
81			//将fullpage页面层级提升盖住固定背景区域
82			$('.containerBox').css({'z-index':'2'});
83			if($('.border').css('display') == 'none' && page_idx > 0){
84				$('.header_scroll,.header_menuBox,#fp-nav,.border').show();
85			}
86			$('#myContainer,#fp-nav,.header_scroll,.header_menuBox').mousewheel(function(event, delta, deltaX, deltaY) {
87		        if (slide_state == 1) {
88		            return false; //阻止默认事件
89		        }
90		        fullPage(delta);
91		        // return false; //阻止默认事件
92			});
93		}else if($(document).scrollTop() <= zzc_top){
94			//页面背景缩放动画效果
95			$('.home_bgBox .bg.st01').css('transform','scale('+ y1 +')');
96			$('.home_bgBox .bg.st02').css('transform','scale('+ y2 +')');
97			$('.home_bgBox .bg.st03').css('transform','scale('+ y3 +')');
98			$('.home_bgBox .bg.st04').css('transform','scale('+ y4 +')');
99			$('.home_bgBox .bg.st05').css('transform','scale('+ y5 +')');
100			$('.home_bgBox').css('opacity',o);
101			if($('.border').css('display') != 'none'){
102				$('.header_scroll,.header_menuBox,#fp-nav,.border').hide();
103			}
104			//将fullpage页面层级减少隐藏在固定背景区域下面
105			if($('.containerBox').css('z-index') != '0'){
106				$('.containerBox').css({'z-index':'0'});
107			}
108		}
109	})
110	//滚动屏幕事件执行
111	function fullPage(delta) {
112	    i = page_idx;
113	    len = $(".pageBox .section").length;
114	    if (delta < 0) { //向下滚动
115	        if (i == len - 1) {
116	            return false; //阻止默认事件
117	        }
118	        i += 1;
119	        slide_state = 1;
120	    } else if (delta > 0) { //向上滚动
121	        if (i == 0) {
122	            return;
123	        }
124	        i -= 1;
125	        slide_state = 1;
126	    }
127	    //右侧导航按钮动画
128	    $('#fp-nav li').eq(i-1).find('a').addClass('active').parent().siblings().find('a').removeClass('active');
129		//页面切换动画
130		$('.section').eq(i).addClass('animate').siblings().removeClass('animate');
131	    page_idx = i;
132	    //定时改变页面状态,状态值为0才能继续滚动页面
133	    clearTimeout(timer1);
134		timer1 = setTimeout(function() {
135	        slide_state = 0;
136	    }, 1500);
137	    if (i == 0) { //首页导航
138	    	$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top * i +'px,0)'});
139	    	$('.header_scroll,.header_menuBox,#fp-nav,.border').hide();
140	    	return false;
141	    }else if (i == 1) { //第一屏
142	    	if($('.border').css('display') == 'none'){
143				$('.header_scroll,.header_menuBox,#fp-nav,.border').show();
144			}
145	    	$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top * i +'px,0)'});
146	    	return false;
147	    }else if (i == 2) { //第二屏
148	    	if($('.border').css('display') == 'none'){
149				$('.header_scroll,.header_menuBox,#fp-nav,.border').show();
150			}
151	    	$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top * i +'px,0)'});
152	    	return false;
153	    }else if (i == 3){ //第三屏
154	    	if($('.border').css('display') == 'none'){
155				$('.header_scroll,.header_menuBox,#fp-nav,.border').show();
156			}
157	    	$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top * i +'px,0)'});
158	    	return false;
159	    }else if (i == 4){ //第四屏
160	    	if($('.border').css('display') == 'none'){
161				$('.header_scroll,.header_menuBox,#fp-nav,.border').show();
162			}
163	    	$('#myContainer .pageBox').css({transform: 'translate3D(0,-'+ bg_top * i +'px,0)'});
164	    	return false;
165	    }
166	}
167})

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.