PageSourceSearch

https://www.clking.com/wp-content/themes/clking2023/js/main.js?ver=2023.04.21.01

js clking.com collected 2026-10-06 17:01:34 UTC 5,609 bytes, 221 lines download raw bytes

1jQuery(document).ready(function(){
2
3  jQuery('#webTicker').webTicker();
4	
5	// Menu
6	jQuery("#menu").bind('click', function() {
7		if(jQuery('body').hasClass('openMenu')){
8			jQuery('body').removeClass('openMenu');
9		} else {
10			jQuery('body').addClass('openMenu');
11		}
12		return false
13	});	   
14
15	// Search
16	jQuery(".searchBtn").bind('click', function() {
17		if(jQuery('body').hasClass('openSearch')){
18			jQuery('body').removeClass('openSearch');
19		} else {
20			jQuery('body').addClass('openSearch');
21		}
22		return false
23	});    
24
25  jQuery(".closeSearch").bind('click', function() {
26		jQuery('body').removeClass('openSearch');
27		return false
28	});
29  
30  // Sliders
31	if(jQuery('.slider').length){
32		jQuery('.slider').slick({
33      infinite: true,
34      slidesToShow: 4,
35      slidesToScroll: 1,
36      dots: true,  
37      arrows: true, 
38      autoplay: true,
39      autoplaySpeed: 3000,   
40      pauseOnHover: false,
41      responsive: [
42        {
43          breakpoint: 900,
44          settings: {
45            arrows: false,
46            slidesToShow: 3
47          }
48        },
49        {
50          breakpoint: 680,
51          settings: {
52            arrows: false,
53            slidesToShow: 2
54          }
55        },        
56        {
57          breakpoint: 480,
58          settings: {
59            arrows: false,
60            centerMode: true,
61            slidesToShow: 1
62          }
63        }
64      ]      
65    }
66  )};  
67
68	if(jQuery('.news-slider').length){
69		jQuery('.news-slider').slick({
70      infinite: true,
71      slidesToShow: 1,
72      slidesToScroll: 1,
73      dots: true,  
74      arrows: false, 
75      autoplay: false,
76      autoplaySpeed: 5000,   
77      adaptiveHeight: false,
78    }
79  )};  
80  
81  // Tabs
82	jQuery(".tabs a").bind('click', function(e) {
83    e.preventDefault();
84    if(!jQuery(this).hasClass('active')) {
85      jQuery(".tabs a").removeClass('active');
86      jQuery(this).addClass('active');
87
88      var tab = jQuery(this).attr('href');
89      jQuery('.data-tab').fadeOut(); 
90      jQuery(tab).fadeIn();     
91    }
92  });
93
94  // Mobile Dropdowns
95  jQuery('.main-menu-item.menu-item-has-children a.main-menu-link').click(function(e){
96    var ww = jQuery(document).width();
97    console.log('here');
98    if (ww < 960) {
99      e.preventDefault();
100      if(!jQuery(this).parent('.menu-item-has-children').hasClass('openSubNav')) {
101        jQuery('.main-menu-item.menu-item-has-children').removeClass('openSubNav');
102        jQuery(this).parent('.menu-item-has-children').addClass('openSubNav');
103      } else {
104        jQuery('.main-menu-item.menu-item-has-children').removeClass('openSubNav');
105      }
106    }
107  });  
108
109  /* Transactions
110  ----------------------------------------- */  
111  jQuery('.transaction').bind('click', function(e) {
112    var id = '#'+jQuery(this).data('id');
113    if(jQuery(this).parent().hasClass('slick-slide')){
114      window.location.href = "/transactions/"+id;
115    } else {
116      openBio(id);
117      window.history.pushState(null, null, id);				
118    }
119    e.preventDefault();	
120  });  
121
122
123  /* Bios 
124  ----------------------------------------- */
125  jQuery('.bio').bind('click', function(e) {
126    var id = '#'+jQuery(this).data('bio');
127    //jQuery(this).addClass('active');
128    openBio(id);
129    window.history.pushState(null, null, id);				
130    e.preventDefault();	
131  });
132
133  jQuery('.overlayBG .close, .overlayBG').bind('click', function(e) {
134    //jQuery('.bio').removeClass('active');
135    jQuery('body').removeClass('bioOpen');
136    jQuery('.overlayBG').fadeOut();	
137    var loc = window.location.href.split('#')[0];
138    window.history.pushState(null, null, loc);			
139    e.preventDefault();	
140  });
141
142  jQuery(".overlay").click(function(e) {
143    e.stopPropagation();
144  });
145
146  /* Coverage List */
147	jQuery('#coverageTable').dataTable({
148		"bPaginate": false,
149    "bLengthChange": false,
150    "bInfo": false,	
151	});  
152
153});
154
155
156// Smooth Scroll
157jQuery('a[href*="#"]')
158  .not('[href="#"]')
159  .not('[href="#0"]')
160  .click(function(event) {
161    if (
162      location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 
163      && 
164      location.hostname == this.hostname
165      &&
166      !jQuery(this).hasClass('tab-link')
167    ) {
168      var target = jQuery(this.hash);
169      target = target.length ? target : jQuery('[name=' + this.hash.slice(1) + ']');
170      if (target.length) {
171        event.preventDefault();
172        jQuery('html, body').animate({
173          scrollTop: target.offset().top - 92
174        }, 1000, function() {
175          var jQuerytarget = jQuery(target);
176          jQuerytarget.focus();
177          if (jQuerytarget.is(":focus")) { 
178            return false;
179          } else {
180            jQuerytarget.attr('tabindex','-1'); 
181            jQuerytarget.focus();
182          };
183        });
184      }
185    }
186  });
187
188
189jQuery(document).on('gform_confirmation_loaded', function(event, formId){
190  console.log('Success');
191  jQuery('#contactDisclaimer').remove();
192});
193
194
195jQuery(window).load(function(){
196	
197	// Open Team Overlay if Exists
198	if(window.location.pathname == '/about/team/' && window.location.hash) {
199		if(jQuery(window.location.hash).length > 0 && jQuery(window.location.hash).hasClass('overlayBG')) {
200			console.log(window.location.hash);
201			openBio(window.location.hash);		
202		} else {
203      jQuery('html, body').animate({
204        scrollTop: jQuery(window.location.hash).offset().top - 92
205      }, 1000)
206    }
207	}
208
209  if(window.location.pathname == '/transactions/' && window.location.hash) {  
210		if(jQuery(window.location.hash).length > 0) {
211      openBio(window.location.hash);
212    }
213  }
214
215});
216
217// Open Bio
218function openBio(id) {
219  jQuery('body').addClass('bioOpen');
220  jQuery(id).fadeIn();
221}

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.