PageSourceSearch

https://www.gesselins.com/js/custom.js

js gesselins.com collected 2026-09-29 09:28:52 UTC 5,425 bytes, 199 lines download raw bytes

1/* Slider function*/
2
3/* Equal Height */
4function equalHeight(group) {
5   tallest = 0;
6   group.each(function() {
7     // thisHeight = $(this).height();
8	  thisHeight = $(this).css({'height':'auto'}).height();
9      if(thisHeight > tallest) {
10         tallest = thisHeight;
11		  
12      }
13   });
14   group.height(tallest);
15}
16$(window).on('load resize', function(){
17equalHeight($(".grid-divider h4"));
18
19 });
20$(document).ready(function() {
21     $("#flexslider").flexisel({
22        visibleItems: 5,
23        animationSpeed: 1000,
24        autoPlay: true,
25        autoPlaySpeed: 3000,            
26        pauseOnHover: false,
27        enableResponsiveBreakpoints: true,
28        responsiveBreakpoints: { 
29            portrait: { 
30                changePoint:480,
31                visibleItems: 2
32            }, 
33            landscape: { 
34                changePoint:640,
35                visibleItems: 3
36            },
37            tablet: { 
38                changePoint:992,
39                visibleItems: 3
40            },
41			tabland: { 
42                changePoint:1199,
43                visibleItems: 4
44            }
45        }
46    });
47});
48
49
50/* input validation for non-jotform pages */
51  
52  function numbersonly(e, decimal) {
53		var key;
54		var keychar;
55		if (window.event) {key = window.event.keyCode;}
56		else if (e) {key = e.which;}
57		else {return true;}
58		keychar = String.fromCharCode(key);
59		if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) {return true;}
60		else if ((("0123456789").indexOf(keychar) > -1)) {return true;}
61		else if (decimal && (keychar == ".")) {return true;}
62		else return false; 
63	}
64	
65/* place holder js for non-jotform*/
66		
67		 $(document).ready(function() {
68            var holder = 'Your Zip Code';
69            $('.zip').blur(function() {
70                if ($(this).val().length == 0)
71                    $(this).val(holder).addClass('holder');
72            }).focus(function() {
73                if ($(this).val() == holder)
74                    $(this).val('').removeClass('holder');
75            }).val(holder).addClass('holder');
76        });
77
78		
79/* place holder js for non-jotform*/
80		
81$('[placeholder]').focus(function() {
82  var input = $(this);
83  if (input.val() == input.attr('placeholder')) {
84    input.val('');
85    input.removeClass('placeholder');
86  }
87}).blur(function() {
88  var input = $(this);
89  if (input.val() == '' || input.val() == input.attr('placeholder')) {
90    input.addClass('placeholder');
91    input.val(input.attr('placeholder'));
92  }
93}).blur();
94
95
96// Active class //
97	$(document).ready(function() {
98$("a").each(function() {
99    if ((window.location.pathname.indexOf($(this).attr('href'))) > -1) {
100        $(this).addClass('active');
101    }
102	
103});
104
105 });
106// social icon switch //
107$(window).bind('resize load', function() {
108    if ($(this).width() < 768) {
109      $('.top_bar_nav').appendTo('.top-left-bg');
110    } else 
111	{
112    $('.top_bar_nav').appendTo('.top-right');
113    }
114}); 
115
116/*navbar-toggler animated*/
117$(document).ready(function () {
118
119
120  $('.navbar-toggler').on('click', function () {
121
122    $('.animated-icon3').toggleClass('open');
123  });
124});
125
126	  
127
128/*appears*/
129 document.addEventListener("DOMContentLoaded", () => {
130        let options = {
131          root: null,
132         rootMargin: "0px 0px -100px 0px",
133          threshold: 0.05
134        };
135        let observer = new IntersectionObserver(beTouching, options);
136        document.querySelectorAll('#carrier-section,.fade-in,.content-visible,.fade-down,.ban-caption-fade-in,.testimonial-caption-fade-in,.banner-zoom-in,.user-animate,.circle-container,.circle-container li img.service-email,.circle-container li img.quote,.circle-container li img.servicecontact,.circle-container li img.manage-policy').forEach(section => {
137          observer.observe(section);
138          
139        });
140      });
141      function beTouching(entries, ob) {
142       
143        entries.forEach(entry => {
144          if (entry.isIntersecting) {
145            console.log("intersecting");
146            
147            entry.target.classList.add("appear");
148            
149          } else {
150            //entry.target.classList.remove("appear");
151          }
152        });
153      }
154	
155/* circle animation*/
156	
157	  $(document).ready(function() {
158  
159
160  $('.circle-container').find('li').hover(function() { 
161 $('.services-container').find('li').removeClass('active');
162 $('.circle-container').find('li').addClass('active-circle-icon');
163    $(this).addClass('active');
164	$(this).removeClass('active-circle-icon');
165$('.service-user').addClass('active2');	
166    $('.services-container').find('li.active').removeClass('active');
167	 $('.circle-container').find('li.active-circle-icon').removeClass('active-circle-icon');
168    $(".services-container").find('li').eq($(this).data('id')).addClass('active');
169	 $(".circle-container").find('li').eq($(this).data('id')).addClass('active-circle-icon');
170  });
171
172
173
174});
175
176 
177
178$(document).ready(function() {
179 windowwidth();
180});
181$(window).on("resize", function(){
182 windowwidth();
183});
184
185/* banner zoom*/
186function windowwidth(){
187 $vWidth = $(window).width();
188
189
190 if($vWidth > 767){
191 $(".banner-bottom-strip").addClass("animation-right-to-left");
192
193	
194 }else{
195 $(".image-container.banslide.banner img").removeClass("animation-right-to-left");
196
197
198 }
199}

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.