PageSourceSearch

https://pacc.com.tw/js/page.js

js pacc.com.tw collected 2026-10-05 23:00:12 UTC 9,677 bytes, 414 lines download raw bytes

1$(function(){
2
3
4	if($('.twzipcode').length){
5		if(typeof ml_key == 'undefined' || ml_key == 'tw'){
6
7			$('.twzipcode:not(.onlyLocal)').twzipcode();
8
9			$('.twzipcode.onlyLocal').twzipcode({
10			    'hideCounty': ['金門縣', '連江縣','澎湖縣'],
11			    'hideDistrict': ['951','952']
12			});
13		}
14	}
15
16
17
18
19	if($('.swipebox').length){
20		$('.swipebox').swipebox();
21	}
22
23
24	if($('.swipebox-video').length){
25		$('.swipebox-video').swipebox({
26			autoplayVideos:false
27		});
28	}
29
30
31	if($(".fancybox").length){
32		$('.fancybox').fancybox({
33			helpers : {
34				title : {
35					type : 'inside'
36				}
37			}
38		});
39	}
40
41	if($(".slidBlock").length){
42		$(".slidBlock").slick({
43			prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
44			nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
45		    autoplay: true,
46	        autoplaySpeed: 3000,
47
48			  responsive: [
49			    {
50			      breakpoint: 1200,
51			      settings: {
52			        slidesToShow: 2,
53			      }
54			    },
55			    {
56			      breakpoint: 768,
57			      settings: {
58			        slidesToShow: 1 ,
59			        dots:true,
60			        focusOnSelect: false
61			      }
62			    }
63			  ]
64		});
65	}
66
67
68	if($("#relateProSlid").length){
69		$("#relateProSlid").slick({
70			prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
71			nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
72			slidesToShow: 5,
73			slidesToScroll: 1,
74		    autoplay: true,
75	        autoplaySpeed: 3000,
76			  responsive: [
77			    {
78			      breakpoint: 1200,
79			      settings: {
80			        slidesToShow: 2,
81			      }
82			    },
83			    {
84			      breakpoint: 768,
85			      settings: {
86			        slidesToShow: 1
87			      }
88			    },
89			    {
90			      breakpoint: 440,
91			      settings:'unslick'
92			    }
93			  ]
94
95		});
96	}
97
98	if($(".itemSlickNav").length){
99		$('.itemSlickNav').slick({
100			slidesToShow: 3,
101			slidesToScroll: 1,
102			dots: false,
103			centerMode: false,
104			focusOnSelect: true,
105			asNavFor: '.itemSlick',
106			prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
107			nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
108
109			  responsive: [
110			    {
111			      breakpoint: 1200,
112			      settings: {
113			        slidesToShow: 3,
114			      }
115			    },
116			    {
117			      breakpoint: 768,
118			      settings: {
119			        slidesToShow: 1
120			      }
121			    }
122			  ]
123
124		});
125	}
126
127	if($(".itemSlick").length){
128		$('.itemSlick').slick({
129			slidesToShow: 1,
130			slidesToScroll: 1,
131			arrows: false,
132			fade: true,
133			asNavFor: '.itemSlickNav',
134			prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
135			nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
136			responsive: [
137			  {
138			    breakpoint: 1024,
139			    settings: {
140			      dots:true,
141			    }
142			  }
143			]
144		});
145	}
146
147	if($(".slideBanner").length){
148		$('.slideBanner').slick({
149		    slidesToShow: 1,
150		    slidesToScroll: 1,
151		    arrows: true,
152		    fade: true,
153		    autoplay: true,
154	        autoplaySpeed: 3000,
155		    prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
156			nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>'
157		});
158	}
159
160	if($(".waterPhotos").length){
161		var $grid = $('.waterPhotos').masonry({
162		  itemSelector: '.item',
163		});
164
165		$grid.imagesLoaded().progress( function() {
166		  $grid.masonry();
167		});
168	}
169
170	if($(".sliderFilter").length){
171		// range slider  (use noUiSlider)
172		var sliderTarget   = ".sliderFilter";
173		var minValueTarget = ".minPrice";
174		var maxValueTarget = ".maxPrice";
175
176	    var thousandComma = function(number){
177	         var num = number.toString();
178	         var pattern = /(-?\d+)(\d{3})/;
179	         while(pattern.test(num)){
180	          num = num.replace(pattern, "$1,$2");
181	         }
182	         return num;
183	    }
184
185		$(sliderTarget).each(function(){
186		    var priceSlider    = this;
187		    var minPrice       = $(this).siblings().find(minValueTarget);
188		    var maxPrice       = $(this).siblings().find(maxValueTarget);
189		    var startValue     = $(this).data("start");
190		    var minValue       = $(this).data("min");
191		    var maxValue       = $(this).data("max");
192		    var stepValue      = $(this).data("step");
193		    var pretxt         = $(this).data("pretxt");
194
195		    noUiSlider.create(priceSlider, {
196		        start:startValue,
197		        connect: true,
198		        step:stepValue ,
199		        range: {
200		            'min': minValue,
201		            'max': maxValue
202		        }
203		    });
204
205		    priceSlider.noUiSlider.on('update', function( values, handle ) {
206		        var value = values[handle];
207		        value=Math.round(value);
208		        formatValue=pretxt+thousandComma(value);
209
210		        if ( handle ) {
211		            maxPrice.value = value ;
212		            maxPrice.html( formatValue );
213		            // $("#showPrice .maxPrice").html(formatValue);
214
215		        } else {
216		            minPrice.value =  value;
217		            minPrice.html( formatValue );
218		            // $("#showPrice .minPrice").html(formatValue);
219		        }
220		     });
221
222		     priceSlider.noUiSlider.on('end', function( values, handle ) {
223	            proFilterAjax($(priceSlider),minPrice.value,maxPrice.value);
224		    });
225
226
227		});
228	}
229
230
231
232	if($(".timeLineSlid").length){
233
234		$(".timeLineSlid.simple").slick({
235			arrows:false,
236			dots:true,
237			infinite:false,
238			responsive: [
239			  {
240			    breakpoint: 1200,
241			    settings: {
242			    	slidesToShow: 3,
243			    	slidesToScroll: 3,
244			    }
245			  },
246			  {
247			    breakpoint: 992,
248			    settings: {
249			    	slidesToShow: 2,
250			    	slidesToScroll: 2,
251			    }
252			  },
253			  {
254			    breakpoint: 768,
255			    settings: {
256			    	slidesToShow: 1,
257			    	slidesToScroll: 1,
258			    	fade:true,
259			    	// variableWidth: true,
260			    	// dots:false,
261
262			    }
263			  }
264			]
265
266		});
267
268		$(".timeLineSlid.slidNav:not(.vType)").slick({
269			asNavFor:'.timeLineSlid.slidContent:not(.vType)',
270			focusOnSelect: true,
271			infinite:false,
272			centerMode: true,
273			dots:false,
274			variableWidth: true,
275		    adaptiveHeight: true,
276		    swipeToSlide:true,
277		    touchThreshold:3,
278	        prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
279	    	nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>'
280
281		});
282		$(".timeLineSlid.slidContent:not(.vType)").slick({
283			asNavFor:'.timeLineSlid.slidNav:not(.vType)',
284			infinite:false,
285			fade:true,
286			arrows:false,
287
288		});
289
290
291		//vType
292		$(".timeLineSlid.slidNav.vType").slick({
293			asNavFor:'.timeLineSlid.slidContent.vType',
294			slidesToShow: 3,
295			focusOnSelect: true,
296			centerMode: true,
297			infinite:false,
298			dots:false,
299		    swipeToSlide:true,
300		    vertical:true,
301		    verticalSwiping:true,
302
303		    prevArrow:'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
304			nextArrow:'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
305			responsive: [
306			  {
307			    breakpoint: 992,
308			    settings: {
309			      vertical:false,
310			      verticalSwiping:false,
311			      variableWidth: true,
312			    }
313			  }
314			]
315
316
317		});
318		$(".timeLineSlid.slidContent.vType").slick({
319			asNavFor:'.timeLineSlid.slidNav.vType',
320			infinite:false,
321			fade:true,
322			arrows:false,
323		});
324
325
326
327	}
328
329
330	if($(".scrollAnimate").length){
331		$(".scrollAnimate").each(function(){
332			//default=fadeInUp
333			animateClass=$(this).attr('data-animateClass');
334			animateClass=(animateClass==undefined || animateClass=="") ? 'fadeInUp':animateClass;
335			console.log(animateClass);
336			$(this).scrollAnimate({animate:animateClass});
337		});
338	}
339
340
341	if($(".scrollMove").length){
342		if(!mobileType){
343			$(".scrollMove").each(function(){
344				$(this).scrollAnimate({animate:'scrollMove'});
345			});
346		}
347	}
348
349
350	if($('.pageLoading').length){
351		$(window).load(function(){
352        	setTimeout(function(){$('.pageLoading').fadeOut(300)},100);
353        });
354	}
355
356	if($('.product').length){
357		$('.proCus_list a[href*="#"]:not([href="#"])').click(function() {
358			if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
359				var target = $(this.hash);
360				target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
361				if (target.length) {
362					$('html, body').animate({
363						scrollTop: target.offset().top
364					}, 1000);
365					return false;
366				}
367			}
368		});
369	}
370
371});
372
373
374if($("#googleTranslate").length){
375	function googleTranslateElementInit() {new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'ja,zh-CN,zh-TW'}, 'googleTranslate');}
376	$('body').append('<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>');
377}
378
379if($(".relation").length){
380	var $tableRows = $('.filter-row');
381	$(".columnfilter").on("change",function() {
382		var filters = [];
383		$(".columnfilter").each(function() {
384			var $that = $(this);
385			var value = $that.val();
386			if(value != 'all') {
387				filters.push( { at: $that.data('attribute'), val: value });
388			}
389		});
390
391		var filtersLength = filters.length;
392		if(filtersLength == 0) {
393			$('.filtert').hide();
394			$tableRows.show();
395		}
396		else {
397			$('.filtert').show();
398			$tableRows.each(function(){
399				var $that = $(this);
400				var showRow = true;
401				for(var i=0;i<filtersLength;i++) {
402					var filter = filters[i];
403					var rowAttValue = $(this).data(filter.at);
404					if(rowAttValue != filter.val) {
405						showRow = false;
406						break;
407					}
408				}
409
410				$that.toggle(showRow);
411			});
412		}
413	});
414}

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.