PageSourceSearch

https://0hm.cn/resource/js/main.js

js 0hm.cn collected 2026-10-09 04:35:03 UTC 2,370 bytes, 84 lines download raw bytes

1$(function(){
2
3	$(".banner-list li").width($(window).width());
4	
5	$('#banner-box').slides({
6		generateNextPrev: false,
7		generatePagination:false,
8		paginationClass:"banner-nav",
9		container: 'banner-list',
10		play: 10000,
11		pause:6000,
12		effect:"fade",
13		slideEasing:"easeInOutQuart",
14		slidesLoaded: function() {
15		},
16		animationStart: function(current){
17		$('.t-d').animate({
18			top:100,left:0
19		});
20		$('.animate-img').animate({top:50,right:0});
21
22	},
23		animationComplete: function(current){
24			$('.t-d').animate({top:100,left:20});
25			$('.animate-img').animate({top:50,right:50});
26		}
27	});
28
29});
30
31//导航展开
32$(function(){
33	$('.men_pro').hover(function(){
34		$(this).children('.sub_menu').stop().fadeIn(200);
35	},function(){
36		$(this).children('.sub_menu').stop().fadeOut(0);
37	})
38});
39
40//轮播图
41var main_swiper = new Swiper('.swiper-banner.swiper-container', {
42    direction: 'horizontal',
43	slidesPerView: 1,
44	pagination : '.swiper-pagination',//下面的图标跟随切换
45	paginationClickable: true,
46    on:{
47        slideChangeTransitionStart: function(){
48          $('#g'+(this.activeIndex+1)).addClass('active').siblings().removeClass('active');
49        },
50        init: function(){
51            swiperAnimateCache(this); //隐藏动画元素 
52            swiperAnimate(this); //初始化完成开始动画
53        }, 
54        slideChangeTransitionEnd: function(){ 
55            swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
56        }
57    }
58});
59var lis = $('.swiper-nav').find('li');
60lis.each(function(i,el){
61    $('#g'+(i+1)).mouseover(function(){
62        main_swiper.slideTo(i, 1000);
63        $(el).addClass('active').siblings().removeClass('active');
64    });
65})
66
67// 邮箱校验
68function checkEmail(){
69	var emailRegex = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
70	var Email = document.getElementsByName("email").value;
71	if (!emailRegex.test(Email)) {
72		alert("请输入有效邮箱");
73		return false;
74	}
75}
76// 邮箱校验
77function checkPhone(){
78	var phoneRegex = /^((13[0-9])|(14[1]|[4-9])|(15([0-3]|[5-9]))|(16[2]|[5-7])|(17[0-3]|[5-8])|(18[0-9])|(19[1|8|9]))\\d{8}$/;
79	var Phone = document.getElementsByName("email").value;
80	if (!phoneRegex.test(Phone)) {
81		alert("请输入有效手机号");
82		return false;
83	}
84}

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.