PageSourceSearch

https://china-anren.com/js/main.js

js china-anren.com collected 2026-10-02 22:38:09 UTC 5,461 bytes, 229 lines download raw bytes

1$(document).ready(function(){
2	WIN_WIDTH = $(window).width();
3    WIN_HEIGHT = $(window).height();
4	$("#header").headroom({
5		tolerance: 5,
6		offset:400,
7		classes: {
8			initial: "animated",
9			pinned: "slideDown",
10			unpinned: "slideUp"
11		}
12	});
13
14	var toggleNav = $('.menutog');
15	toggleNav.on('click', function() {
16		if (!toggleNav.hasClass('menuBtnShow')) {
17			toggleNav.addClass('menuBtnShow');
18			$("body").addClass("open");
19			$('#background').fadeIn();
20		} else {
21			toggleNav.removeClass('menuBtnShow');
22			$("body").removeClass("open");
23			$('#background').fadeOut();
24		}
25	});
26	$('.nav li .nwn').click(function(){
27            if($(this).hasClass('on')){
28                $(this).removeClass('on');
29                $(this).next().slideUp();
30            }else{
31                $(this).addClass('on');
32                $(this).next().slideDown();
33                $(this).parent().siblings().find('.w-tcnav').slideUp();
34                $(this).parent().siblings().find('.nwn').removeClass('on');
35            }
36        })
37
38	var swiper = new Swiper('.ban-swiper', {
39		loop : true,
40		speed:1200,
41		effect : 'fade',
42		autoplay: {
43			delay:5000,
44			disableOnInteraction: false,
45	  	},
46      autoHeight: true,
47		navigation: {
48        nextEl: '.ban-next',
49        prevEl: '.ban-prev',
50      },
51	  pagination: {
52        el: '.ban-pag',
53		clickable :true,
54      }
55    });
56	var swiper2 = new Swiper('.new-swiper', {
57		autoplay: {
58			delay: 5000,
59		},
60		loop : true,
61		allowTouchMove: false,
62		speed:800,
63		slidesPerView: 1,
64        spaceBetween : '4%',
65		roundLengths : true, 
66		breakpoints: {
67        1025: { 
68		slidesPerView : 2
69        }}
70    });
71	var tabs1Swiper = new Swiper('.tabs1-swiper', {
72        speed: 500,
73		allowTouchMove: false,
74		effect : 'fade',
75		fadeEffect: {
76			crossFade: true,
77		},
78    });
79	var tabs2Swiper = new Swiper('.tabs2-swiper', {
80        speed: 500,
81		allowTouchMove: false,
82		effect : 'fade',
83		on:{
84			init:function(swiper){
85		        slide=this.slides.eq(0);
86			    slide.addClass('ani-slide');
87		    },
88			transitionStart: function(){
89			    for(i=0;i<this.slides.length;i++){
90			    	slide=this.slides.eq(i);
91			        slide.removeClass('ani-slide');
92				}
93		    },
94			transitionEnd: function(){
95				slide=this.slides.eq(this.activeIndex);
96			    slide.addClass('ani-slide');
97				
98		    },
99		}
100
101    });
102    $(".tabs1 li").on('click', function(e) {
103        e.preventDefault();
104        $(".tabs1 .act").removeClass('act');
105        $(this).addClass('act');
106        tabs1Swiper.slideTo($(this).index());
107        tabs2Swiper.slideTo($(this).index());
108    });
109	
110	var swiper5 = new Swiper('.link-swiper', {
111	  slidesPerView : 3, 
112	  spaceBetween : 28,
113      navigation: {
114        nextEl: '.link-next',
115        prevEl: '.link-prev',
116      },
117	  breakpoints: {
118        641: { 
119          slidesPerView: 5,
120        }}
121    });
122
123	$('.f-weix').click(function(){
124            var code = '<div id="wewm" style="width:260px;height:260px;position:fixed;top:50%;left:50%;margin-left:-130px;margin-top:-130px;z-index:99999;"><img src="images/ewm.png" width="100%" /></div>'
125            $('body').append(code);
126            $('#background').fadeIn();
127        });
128        $('#background').click(function(){
129			toggleNav.removeClass('menuBtnShow');
130			$("body").removeClass("open");
131            $('#background').fadeOut();
132            $('#wewm').remove();
133        });
134
135	$(function(){
136        $(".arctext").show().arctext({
137            radius:600
138        })
139    });
140
141	
142	var $backToTop = $(".ftop");
143	/* 隐藏回顶部按钮 */
144	$backToTop.hide();
145	$(window).on('scroll', function() {
146		if ($(this).scrollTop() > 1000) { /* 返回顶部按钮将在用户向下滚动100像素后出现 */
147		$backToTop.fadeIn();
148		} else {
149		$backToTop.fadeOut();
150		}
151	});
152	$backToTop.on('click', function(e) {
153		$("html, body").animate({scrollTop: 0}, 500);
154	});
155
156	
157
158	var swiper7 = new Swiper('.place-swiper', {
159	  autoplay: {
160		delay: 5000,
161		disableOnInteraction: false,
162	  },
163	  speed:1000,
164	  lazy: {
165			loadPrevNext: true,
166			loadPrevNextAmount: 3,
167	  },
168	  autoHeight: true,
169      effect: 'fade',
170	  loop:true,
171      pagination: {
172        el: '.place-pag',
173        type: 'fraction',
174      },
175      navigation: {
176        nextEl: '.place-next',
177        prevEl: '.place-prev',
178      },
179    });
180    var galleryTop = new Swiper('.gallery-top', {
181	  speed:600,
182	  effect : 'fade',
183      spaceBetween:10,
184      navigation: {
185        nextEl: '.gallery-next',
186        prevEl: '.gallery-prev',
187      },
188	  pagination: {
189		el: '.gallery-pag',
190		type: 'fraction',
191		},
192      thumbs: {
193        swiper: {
194		el: '.gallery-thumbs',
195		spaceBetween: 10,
196		slidesPerView: 4,
197		watchSlidesVisibility: true,
198		watchSlidesProgress: true,
199		breakpoints: {
200		769: { 
201		slidesPerView: 8,
202		spaceBetween: 15,
203		}
204		},
205		},
206		autoScrollOffset: 1,
207	  },
208    });
209	var swiper8 = new Swiper('.rim-swiper', {
210	  speed:600,
211	  effect : 'fade',
212	  fadeEffect: {
213		crossFade: true,
214	  },
215	  roundLengths : true, 
216	  autoHeight: true,
217      loop : true,
218      navigation: {
219        nextEl: '.rim-next',
220        prevEl: '.rim-prev',
221      },
222	  pagination: {
223		el: '.rim-pag',
224		clickable :true,
225		}
226    });
227
228});
229AOS.init({easing: 'ease-out-back',duration: 1000,once:'true'});

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.