PageSourceSearch

https://foscam.com/Public/Home/css/index.js

js foscam.com collected 2026-09-24 19:47:20 UTC 6,418 bytes, 258 lines download raw bytes

1// JavaScript Doc.
2$(document).ready(function(e) {
3	//判断浏览器版本
4	check();
5	/*导航栏动画*/
6    banner_animation();
7	/*导航栏li动画*/
8	li_animation();
9	/*click  login*/
10	//loginclick();
11	/*登录验证邮箱*/
12	//checkEmail();
13	/*注册验证*/
14	checkreg();
15	/*邮箱-退出fade*/
16	Email_fade();
17		/*首页轮换*/
18	turn();
19	
20
21	
22});
23
24function turn(){
25	var length=$('#banner_turn li').length;
26		length=parseInt(length);		
27	var now=0;	
28/*	        
29	function play2(){
30		var timer=setTimeout(function(){
31			var top=$('#banner_turn').css('top');		
32			top=parseInt(top)-732;
33			if(top<=732*length*(-1)){top=0;}		
34			$('#banner_turn').stop(true,false).animate({
35				'opacity':0,	
36			},100,function(){
37				$(this).animate({
38					'opacity':1,	
39				},2900).css('top',top);	
40			});
41			now=top/(-732);
42			now=parseInt(now);
43			$('#turn i').css({'background-color':'#ccc','border-width':'0px'});
44			$('#turn i').eq(now).css({
45				'background-color':'transparent',
46				'border-color':'red',
47				'border-style':'solid',
48				'border-width':'1px'
49			});		
50			play2();		
51		},3000);
52		
53	}
54function stop2() {
55     clearTimeout(timer);
56 }	
57	 play2();
58*/
59	var setIntervals= setInterval(function(){
60		var top=$('#banner_turn').css('top');		
61		top=parseInt(top)-732;
62		if(top<=732*length*(-1)){
63			top=0;
64		}
65		//$('#banner_turn').css('top',top);
66		$('#banner_turn').stop(true,false).animate({
67			'opacity':0,	
68		},100,function(){
69			$(this).animate({
70				'opacity':1,	
71			},4900).css('top',top);	
72		});
73		now=top/(-732);
74		now=parseInt(now);
75		$('#turn i').css({'background-color':'#ccc','border-width':'0px'});
76		$('#turn i').eq(now).css({
77			'background-color':'transparent',
78			'border-color':'red',
79			'border-style':'solid',
80			'border-width':'1px'});
81		
82	},8000);
83	$('#banner_turn').hover(function(){
84			clearInterval(setIntervals);
85		},function(){
86	
87		});
88	$('#turn i').click(function(){
89	$('#turn i').css({'background-color':'#ccc','border-width':'0px'});
90		
91		$(this).css({'background-color':'transparent','border-color':'red','border-style':'solid','border-width':'1px'});
92		now=$(this).attr('alt');
93		now=parseInt(now);
94		now=now*732*(-1);
95		if(now<=732*length*(-1)){
96						now=0;
97					}
98		$('#banner_turn').stop(true,false).animate({
99			'opacity':0,	
100		},100,function(){
101			$(this).animate({
102				'opacity':1,	
103			},4900).css('top',now);	
104		});
105		
106	})	
107}
108function Email_fade(){
109	var length=$('.login a').length;
110	if(length==2){
111		$('.login a').first().mouseover(function(){
112		$('.login a').first().fadeOut('fast');
113		$('.login a').eq(1).fadeIn('fast');
114		})
115	$('.login a').eq(1).mouseout(function(){
116		$('.login a').eq(1).fadeOut('fast');
117		$('.login a').first().fadeIn('fast');	
118			})
119		}
120	
121	}
122
123/*注册验证*/
124function checkreg(){
125	$('.reg_click .email').first().blur(function(){//email
126		var email=$(this).val();
127		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
128		if(!filter.test(email)){
129			$(this).css({'border-color':'red'}) 
130			}else{
131			$(this).css({'border-color':'#999'}) 	
132				}
133			})
134	$('.reg_click .email').eq(1).blur(function(){//name
135		var name=$(this).val();
136		if(name==''){
137			$(this).css({'border-color':'red'});
138			}else{
139				$(this).css({'border-color':'#999'});
140				}
141		})
142	$('.reg_click form').submit(function(){
143		var inputlen=$('.reg_click input[type="text"]').length;//获取input类型为text的数量
144		var length=$('.reg_click select').length;//获取select的数量
145		for(var j=0;j<inputlen;j++){
146			var textval=$('.reg_click input[type="text"]').eq(j).val();
147			if(textval==''){
148			$('.reg_click input[type="text"]').eq(j).css({'border-color':'red'});
149			return false;
150			}else{
151			$('.reg_click input[type="text"]').eq(j).css({'border-color':'#999'});	
152				}
153				
154			}
155		
156		for(var i=0;i<length;i++){
157		var val=$('.reg_click select').eq(i).val();
158		if(val==''){
159			$('.reg_click select').eq(i).css({'border-color':'red'});
160			return false;
161			}else{
162			$('.reg_click select').eq(i).css({'border-color':'#999'});	
163				}
164		}
165		})
166	
167	
168	}
169	
170/*登录验证邮箱*/
171function checkEmail(){
172	
173	$('.login_click .email').blur(function(){
174		var email=$('.login_click .email').val();
175		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
176		if(!filter.test(email)){
177			$('.login_click .email').css({'border-color':'red'})
178			return false; 
179			}else{
180			$('.login_click .email').css({'border-color':'#999'}) 
181				return true;			
182				}
183		})
184		$('#submit').click(function(){
185			var email=$('.login_click .email').val();
186			if(email==''){
187				$('.login_click .email').css({'border-color':'red'})
188				return false;
189			}
190		})
191	}
192/*click  login*/
193function loginclick(){
194	
195		$('.logina').click(function(){
196		$('.login_click').fadeIn('fast');
197		})
198	$('.login_click .close').click(function(){
199		$('.login_click').fadeOut('fast');
200		})
201	$('.submit').next().click(function(){
202		$('.login_click').fadeOut('fast');
203		$('.reg_click').fadeIn('fast');
204		})
205	$('.reg_click .close').click(function(){
206		$('.reg_click').fadeOut('fast');
207		})
208		$('.reg_click a').click(function(){
209			$('.reg_click').fadeOut('fast');
210			$('.login_click').fadeIn('fast');
211			})
212		
213	
214	
215
216	}
217/*判断浏览器版本*/
218function check(){
219		(function(){
220		if($.browser.msie){
221				if($.browser.version<=7){
222					alert('Your IE browser version is too low, please change the version of the IE8 to browse the web');
223					return false;
224					}
225				if($.browser.version==8){
226					$('.video_right').css('background-color','#fff');
227					}	
228			}
229		})();
230	}
231/*导航栏li动画function*/
232function li_animation(){
233	$('.header .ul li').siblings().hover(function(){
234		$(this).children().fadeIn('fast');
235		$(this).find('#second li').hover(function(){
236			$(this).find('#three').fadeIn('fast');
237			},function(){
238				$(this).find('#three').fadeOut('fast');
239				//$('#three').fadeOut('fast');
240				})
241		},function(){
242			$(this).find('#second').fadeOut('fast'); 
243			})
244	}
245/*导航栏动画*/
246function banner_animation(){
247	$('.header .ul .li').hover(function(){
248		$('.ol').fadeIn(500);
249		},function(){
250			
251			$('.ol').fadeOut(0);
252			})
253	$('.ol').hover(function(){
254		$('.ol').fadeIn(0);
255		},function(){
256		$('.ol').fadeOut(0);
257			})
258	}

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.