PageSourceSearch

https://www.solvay.edu/wp-content/themes/solvay/js/scripts.js?ver=1.0.0

js solvay.edu collected 2026-10-01 11:44:18 UTC 3,681 bytes, 163 lines download raw bytes

1(function ($, root, undefined) {
2	
3	$(function () {
4		
5		'use strict';
6		
7		// DOM ready, take it away
8
9		if($('.slider-wrapper').length > 0) {
10			$('.slider-wrapper').slick({
11				dots: true,
12				arrows: false,
13				draggable: false,
14				autoplay: true,
15				autoplaySpeed: 4000
16			})
17		}
18
19		$('.menu-item').on('mouseover', function() {
20			if($(this).children('.sub-menu').length > 0 && $('.navbar-collapse').attr('aria-expanded') != "true") {
21				$(this).parents('.navbar-collapse').addClass('showsubmenu');
22			}
23		}).on('mouseleave', function() {
24			$('.navbar-collapse').removeClass('showsubmenu');
25		})
26
27		$('.btn-whos, .closesearch').on('click', function() {
28			$('.searchheader').slideToggle();
29		});
30
31		if($('#event-calendar').length > 0) {
32			var today = new Date();
33
34			var dd = today.getDate(); 
35			var mm = today.getMonth()+1;
36			var yy = today.getFullYear();
37
38			var mindate = yy+'/'+mm+'/'+dd;
39			var mm = today.getMonth()+4;
40
41			if( mm > 12 ){
42				mm = mm-12;
43				yy = yy+1;
44			}
45
46			var maxdate = yy+'/'+mm+'/'+dd;
47			moment.locale('en', {
48				week: { dow: 1 } // Monday is the first day of the week
49			 });
50			$('#event-calendar').datetimepicker({
51				inline: true,
52				format: 'DD/MM/YYYY',
53				minDate: mindate,
54				maxDate: maxdate,
55				enabledDates: eventDates,
56				defaultDate: selectedDate,
57				locale: currentlang,
58			 });
59
60			 
61		}		
62
63		$(document).on('dp.change', function(e) {
64			window.location.href = '?selecteddate='+ moment(e.date).format('YYYY-MM-DD');
65		})
66
67		if($('#map').length > 0) {
68			var map;
69			function initMap() {
70			map = new google.maps.Map(document.getElementById('map'), {
71				center: {lat: -34.397, lng: 150.644},
72				zoom: 8
73			});
74			}
75
76		}
77
78		$('.navbar-toggle').on('click', function() {
79			$('.navbar-collapse').toggleClass('showmenu');
80		});
81
82		// WhosWho ===============================
83		if( $(".whoswho-section").length > 0 ){
84			$(document).on("keyup", "#search_whoswho", function(){				
85				searchByName();		
86				if ($('#search_whoswho').val() != '') {
87					$('.whoswho-section').addClass('in-search');		
88				} else {
89					$('.whoswho-section').removeClass('in-search');
90				}
91			});
92
93			$(document).on("click", ".search_whoswho button.btn-search", function(){
94				searchByName();				
95				if ($('#search_whoswho').val() != '') {
96					$('.whoswho-section').addClass('in-search');		
97				} else {
98					$('.whoswho-section').removeClass('in-search');
99				}
100			});
101
102			$(document).on("click", ".search_whoswho button.btn-reset", function(){
103				$('.whoswho-section').removeClass('in-search');
104				$("#search_whoswho").val( "" );
105				searchByName();				
106			});
107			
108		}
109
110		function searchByName() {
111
112			$(".department-section, .sub-department-section").show();
113		  
114		  // Declare variables
115		  var input, filter, ul, li, a, i, txtValue;
116		  input = document.getElementById('search_whoswho');
117		  filter = input.value.toLowerCase();
118
119		  if( filter == '' ){
120		  	$(".btn-reset").hide();
121		  	$(".departments").show();
122
123		  }else{
124		  	$(".btn-reset").fadeIn();
125		  	$(".departments").hide();
126		  }
127
128		  console.log(filter);
129		  
130		  $(".js_searchname").each(function(){
131		  	
132		  	txtValue = $(this).attr("data-name");
133		  	if (txtValue.toLowerCase().indexOf(filter) > -1) {
134		      $(this).show();
135		    } else {
136		      $(this).hide();
137		    }
138
139		  });
140
141		  // hide sub-section
142		  $(".sub-department-section").each(function(){
143
144		  	if( $(this).find(".js_searchname:visible").length <= 0 ){
145		  		$(this).hide();
146		  	}
147
148		  });
149
150		  // hide section
151		  $(".department-section").each(function(){
152
153		  	if( $(this).find(".js_searchname:visible").length <= 0 ){
154		  		$(this).hide();
155		  	}
156
157		  });
158
159		}
160		
161	});
162	
163})(jQuery, this);

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.