1jQuery(document).ready(function($) { 2 var urlParams = new URLSearchParams(window.location.search); 3 var filterParam = urlParams.get('type'); 4 5 if (filterParam) { 6 console.log('Filter found in URL:', filterParam); 7 8 $('.js-scholarship-checkbox').prop('checked', false); 9 $('.js-scholarship-checkbox[value="' + filterParam + '"]').prop('checked', true); 10 } 11 12 $('.js-scholarship-checkbox').on('change', function() { 13 14 var activeFilters = $('.js-scholarship-checkbox:checked').map(function() { 15 return 'scholarship-filter-' + $(this).val(); 16 }).get(); 17 18 var isVeteranChecked = $('.js-scholarship-checkbox[value="veteran"]').is(':checked'); 19 20 $('.scholarship').each(function() { 21 var item = $(this); 22 var hasVisibleClass = activeFilters.some(function(filterClass) { 23 var hasClass = item.hasClass(filterClass); 24 return hasClass; 25 }); 26 27 // Always hide if it's a veteran scholarship and "veteran" is unchecked 28 if (!isVeteranChecked && item.hasClass('scholarship-filter-veteran')) { 29 item.hide(); 30 } else if (hasVisibleClass) { 31 item.show(); 32 } else { 33 item.hide(); 34 } 35 }); 36 }); 37});
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.