PageSourceSearch

http://www.ihca.org/wp-content/themes/ihca-2025/tools/assets/js/search_function.js?ver=7.0.5

js ihca.org collected 2026-10-04 10:59:43 UTC 1,872 bytes, 56 lines download raw bytes

1jQuery(document).ready(function($) {
2	// search prevent empty submit
3		$("form.search").on("submit", function(e) {
4			if( jQuery(this).find("input[type=text]").val() == "" ) {
5				e.preventDefault();
6				return false;
7			}
8			$(this).find("input[type=text]").focus();
9		});
10		$("form.search").hover(function(){
11   			$("form.search").addClass("show");
12		}, function(){
13			setTimeout(function() {
14				$("form.search").removeClass("show");
15			}, 8000);
16		});
17
18	// search form
19		// pop up
20		$('#search_btn').click(function(){
21			$('.searchform').toggleClass('show');
22			$(this).parent().toggleClass('show');
23
24			// aria expanded
25			if($(this).hasClass('show')) {
26				// this is open now - aria-expanded="true"
27				$(this).attr('aria-expanded', true);
28				$('.searchform').attr('aria-expanded', true);
29			} else {
30				// this is closed now - aria-expanded="false"
31				$(this).attr('aria-expanded', false);
32				$('.searchform').attr('aria-expanded', false);
33			}
34		});
35		// focus should do it too
36		$('#search-form input[type="text"], #search-form input[type="submit"]').focus(function(){
37			$('.searchform').addClass('show');
38			$(this).parent().addClass('show');
39			// this is open now - aria-expanded="true"
40			$('#search_btn').attr('aria-expanded', true);
41			$('.searchform').attr('aria-expanded', true);
42		});
43		// remove active on focus out of the label
44		$('#search_btn').focusout(function(){
45			$('.searchform').removeClass('show');
46			$('.searchform fieldset').removeClass('show');
47			$('#search_btn').attr('aria-expanded', false);
48			$('.searchform').attr('aria-expanded', false);
49		});
50
51		// search page
52		$('body.search-results .searchform').addClass('show');
53		$('body.search-results #search_btn').parent().addClass('show');
54		$('body.search-results .searchform').attr('aria-expanded', true);
55		$('body.search-results #search_btn').attr('aria-expanded', true);
56});

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.