PageSourceSearch

https://biographersinternational.org/wp-content/themes/bio/_js/scripts-init.js?ver=1665966472

js biographersinternational.org collected 2026-10-02 05:15:07 UTC 6,006 bytes, 233 lines download raw bytes

1jQuery(function ($) {
2	
3	if ($(window).width() < 981) {
4
5		$('.has-sub-menu a').click(function(e){
6			if( $(this).parent().has('ul').length > 0 ) {
7			  e.preventDefault();
8			  $(this).parent().addClass('active-sub-menu');
9			  //console.log('A clicked');	
10			}  
11		});
12		
13	}
14
15	// EASY TABS
16	$('#award-tabs').easytabs();
17	$('#conference-tabs').easytabs();
18	$('#program-tabs').easytabs();
19	$('#newsletter-tabs').easytabs();
20	$('#page-tabs').easytabs();
21	
22	// SCROLL TO TOP
23	$("a[href='#top']").click(function() {
24	  $("html, body").animate({ scrollTop: 0 }, "slow");
25	  return false;
26	});
27
28	// ISOTOPE
29	$('#filters-select').on( 'change', function() {
30	  var filterValue = this.value;
31	  
32	  if (filterValue == 0) {
33	  	
34	  	$('.element-item').show();
35	  	
36	  }
37	  else 
38	  {
39	  	
40		  filterValue = '.element-item.' + filterValue;
41		  $('.element-item').hide();
42		  $( filterValue ).fadeIn();
43	  
44		}
45	});
46	
47	// MOBILE NAV MENU
48	$('#nav-toggle').on('click', function() {
49		console.log('nav clicked');
50		$(this).toggleClass('nav-active');
51	  $('#menu-main').toggleClass('active');
52	});
53	
54	// OWL CAROUSEL
55	$('.owl-carousel').owlCarousel({
56	  items:4,
57	  lazyLoad:true,
58		nav:true,
59	  navText:  ['<img src="https://biographersinternational.org/wp-content/themes/bio/_images/back.png">','<img src="https://biographersinternational.org/wp-content/themes/bio/_images/next.png">'],
60	  loop:true,
61	  margin:10,
62    autoplay:true,
63    autoplaySpeed: 7000,
64    autoplayHoverPause:true,
65		responsive:{
66			0:{
67					items:1
68			},
69			480:{
70					items:2
71			},
72			768:{
73					items:3
74			},
75			992:{
76					items:4
77			}
78		}
79	});
80
81	$('.popup-modal').magnificPopup({
82		type: 'inline',
83		preloader: false,
84		focus: '#tbccode',
85		modal: true
86	});
87	$(document).on('click', '.popup-modal-dismiss', function (e) {
88		e.preventDefault();
89		$.magnificPopup.close();
90	});
91	
92	$('.mag-gallery').magnificPopup({
93		delegate: 'a',
94	  type: 'image',
95	  gallery:{
96	    enabled:true
97	  }
98	});	
99	
100	$('.popup-gallery').magnificPopup({
101		delegate: '.owl-item:not(.cloned) a',
102		type: 'image',
103		removalDelay: 500, //delay removal by X to allow out-animation
104		callbacks: {
105			beforeOpen: function() {
106				// just a hack that adds mfp-anim class to markup 
107				 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
108				 this.st.mainClass = this.st.el.attr('data-effect');
109			}
110		},
111		tLoading: 'Loading image #%curr%...',
112		mainClass: 'mfp-img-mobile',
113		gallery: {
114			enabled: true,
115			navigateByImgClick: true,
116			preload: [0,1] // Will preload 0 - before current, and 1 after the current image
117		},
118		image: {
119			tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
120			titleSrc: function(item) {
121				return item.el.attr('title') + '<small></small>';
122			}
123		}
124	});
125	
126	var allPanels = $('.accordion > dd').hide();
127   
128  // ACCORDION
129  $('.accordion > dt > a').click(function() {
130    //allPanels.slideUp();
131    $(this).parent().next().slideToggle();
132    return false;
133  });
134
135	$('.accordion > dt > a').bind('click',function(){
136      //var self = $(this).parent().next();
137      var self = this;
138      setTimeout(function() {
139          theOffset = $(self).offset();
140          $('body,html').animate({ scrollTop: theOffset.top - 50 });
141          console.log(theOffset.top);
142      }, 310); // ensure the collapse animation is done
143  });
144
145	// EXPAND // COLLAPSE
146	$(".hide-header").click(function () {	
147    $header = $(this);
148    //getting the next element
149    $content = $header.next();
150    $altheader = $header.prev();
151    //open up the content needed - toggle the slide- if visible, slide up, if not slidedown.
152    $content.slideToggle(250, function () {
153        //execute this after slideToggle is done
154        //change text of header based on visibility of content div
155        $header.text(function () {
156            //change text based on condition
157            return $content.is(":visible") ? "Collapse -" : "Expand +";
158        });
159    });
160    $altheader.slideToggle(250);
161	});
162
163	// DATATABLES
164
165  // DataTable
166  var table = $('#member-directory-table').DataTable({  	
167        "order": [[ 1, "asc" ]],
168        "autoWidth": false,
169        "dom": 'lrtip',
170        "language": {
171            "info":         "Showing _START_ to _END_ of _TOTAL_ Members",
172            "infoFiltered": "(filtered from _MAX_ total Members)",
173            "zeroRecords":  "No matching Members found",
174            "infoEmpty":    "",
175            "emptyTable":   "No Members",
176            "lengthMenu":   "Show _MENU_ Members",
177        },
178        mark: true,
179  }); 
180
181  
182	$('#state-filter').on("change", function(){
183		filterColumn('#state-filter', 3);
184	});
185	
186	$('#country-filter').on("change", function(){
187		filterColumn('#country-filter', 4);
188	});
189	
190	$('#genre-filter').on("change", function(){
191		filterColumnText('#genre-filter', 6);
192	});
193	
194	$('input#global-search').on( 'keyup click', function () {
195		filterGlobal();
196  });
197  
198  $('input.column-filter').on( 'keyup click', function () {
199  	filterColumn( $(this), $(this).attr('data-column') );
200  });
201  
202  $('#clear-all-filters').click(function( event ) {
203  	event.preventDefault();  	
204  	$('input.column-filter').val('');
205  	$('input#global-search').val('');
206  	$('#state-filter').val('');
207  	$('#genre-filter').val('');
208  	
209  	table.search('').draw();
210  	table.columns().search('').draw();
211  });
212	
213	function filterColumn ( input, i ) {
214    table.column( i ).search(
215        $(input).val(),
216    ).draw(); 
217	}
218	
219	function filterColumnText ( input, i) {
220		var searchtext = $(input).find(":selected").text();
221		if(searchtext == '-- View All --') { searchtext = '';}
222    table.column( i ).search(
223        searchtext,
224    ).draw(); 
225	}
226	
227	function filterGlobal () {
228    table.search(
229        $('#global-search').val(),
230    ).draw();
231	}
232  
233});

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.