PageSourceSearch

https://www.thermaxxjackets.com/wp-content/themes/forwardtrends-custom-theme-alternate/js/functions.js

js thermaxxjackets.com collected 2026-10-02 10:13:59 UTC 4,266 bytes, 190 lines download raw bytes

1jQuery(document).ready(function(){
2	
3	/* hash scrolling */
4	jQuery('a[href*="#"]:not([href="#"])').add('map#repmap area').click(function() {
5		//alert('clicked');
6		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
7		  var target = jQuery(this.hash);
8		  target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
9		  if (target.length) {
10			jQuery('html,body').animate({
11			  scrollTop: target.offset().top - 80
12			}, 800);
13			return false;
14		  }
15		}
16	});
17	
18	/* return to top */
19	
20	jQuery('#back-top a').click(function () {
21		jQuery('body,html').animate({
22			scrollTop: 0
23		}, 800);
24		return false;
25	});
26	
27	/* auto resizing */
28	
29	var resize = function() {
30		jQuery('.royalSlider').css({
31			width: jQuery(window).width(),
32		});
33		if(jQuery(window).height() < 980 ) {
34			jQuery('.royalSlider').css({
35				height: jQuery(window).height() - 100
36			});
37		}
38		
39	};
40	jQuery(window).on('resize', resize);
41	
42	/* scrolling */
43	
44	jQuery(window).scroll(function() {
45		
46		/* scroll passed splash */
47		
48		var target = jQuery('#site-header');
49		var scrollpassed = jQuery('#splash');
50		var targetHeight = scrollpassed.outerHeight();
51		var scrollPercent = window.scrollY / targetHeight;
52		
53		if(scrollPercent >= 0 && scrollPercent < 1){
54			jQuery("#site-header").removeClass("hactive");
55			//target.css('background-color', 'rgba(255,255,255,'+scrollPercent+')');
56			
57		}else {
58			jQuery("#site-header").addClass("hactive");
59			//target.css('background-color', 'rgba(255,255,255,1)');
60		}
61		
62		/* show return to top */
63		
64		if (jQuery(this).scrollTop() > targetHeight) {
65			jQuery('#back-top').fadeIn();
66		} else {
67			jQuery('#back-top').fadeOut();
68		}
69	});
70	
71	/* search */
72	
73	jQuery('div.mobile-btn-search').click(function(e) {
74	    jQuery('#topsearch').slideToggle();
75		e.preventDefault();
76	});
77
78	jQuery('a#togglesearch').click(function(e) {
79	    const topSearch = jQuery('#topsearch');
80	    if (topSearch.css('display') === 'none') {
81	        topSearch.css('display', 'flex');
82	    } else {
83	        topSearch.css('display', 'none');
84	    }
85	    e.preventDefault();
86	});
87
88	
89	/* fire up mobile hooks */
90	
91	jQuery("#mobile-btn a").click(function(ev) { 
92		ev.preventDefault();
93		var targetdiv = jQuery('#site-nav');
94		
95		targetdiv.slideToggle("slow"); 
96		
97		if (jQuery(this).hasClass('off')) {
98			jQuery(this).removeClass('off').addClass('on');
99		}else{
100			jQuery(this).removeClass('on').addClass('off');
101		}
102		
103	});
104	
105	//modals
106	
107	jQuery('a[href*=".jpg"], a[href*="jpeg"], a[href*=".png"], a[href*=".gif"]').addClass('pop').attr( 'rel', 'gallery' );
108	
109	jQuery('a.videopop').magnificPopup({
110		type: 'iframe'
111	  // other options
112	});
113	
114	jQuery('.portfolio-block').magnificPopup({
115		delegate: 'a', // child items selector, by clicking on it popup will open
116		type: 'iframe'
117	  // other options
118	});
119	
120	jQuery('a[class^="pop"]').magnificPopup({
121		type: 'image',
122		gallery:{enabled:true}
123	  // other options
124	});
125	
126	/* */
127	
128	
129	/* slider */
130	
131	jQuery(".royalSlider").royalSlider({
132		imageScaleMode: 'fill',
133		autoScaleSlider:false,
134		autoHeight: false,
135		slidesSpacing: 0,
136		fadeinLoadedSlide: true,
137		allowCSS3:true,
138		navigateByClick: true,
139		sliderDrag: false,
140		loop: true,
141		autoPlay: {
142    		// autoplay options go gere
143    		enabled: true,
144    		pauseOnHover: true,
145			delay: 5000
146    	}
147	});
148	
149	jQuery(".testimonial-wrapper").royalSlider({
150		autoScaleSlider:false,
151		arrowsNav: true,
152		autoHeight: true,
153		slidesSpacing: 20,
154		fadeinLoadedSlide: true,
155		allowCSS3:true,
156		navigateByClick: false,
157		sliderDrag: true,
158		loop: true,
159		autoPlay: {
160    		// autoplay options go gere
161    		enabled: true,
162    		pauseOnHover: true,
163			delay: 5000
164    	}
165	});
166	
167	// fire it up
168	
169	jQuery("#back-top").hide();
170	window.scrollTo(0,0);
171	
172	jQuery(window).load(function() {
173		resize();
174		var $grid = jQuery('.grid-filter').isotope({
175		  // options
176		});
177		
178		// filter items on button click
179		jQuery('.grid-filter-buttons').on( 'click', 'a', function(e) {
180			e.preventDefault();
181			var filterValue = jQuery(this).attr('data-filter');
182			$grid.isotope({ filter: filterValue });
183		});
184	})
185	
186});
187
188document.addEventListener( 'wpcf7mailsent', function( event ) {
189    location = '/contact/find-your-rep/';
190}, false );

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.