PageSourceSearch

https://id.standard.no/Basetheme/js/global-functions.js

js standard.no collected 2026-10-01 11:26:22 UTC 966 bytes, 38 lines download raw bytes

1$(document).ready(function () {
2
3	// _jsShowHide: generic show / hide
4	$('._jsShowHide').on('click', function(e) {
5		e.preventDefault();
6		var targetID = $(this).attr('aria-controls');
7		var target = $('#' + targetID);
8
9		if (target.prop('hidden') === false) {
10			target.prop('hidden', true);
11			$(this).attr('aria-expanded', false);
12		}
13		else {
14			target.prop('hidden', false).attr('tabindex', '-1').focus();
15			$(this).attr('aria-expanded', true);
16		}
17	});
18
19	// _jsCloseOutside: hide menu on click outside it.
20	$(window).on('click', function (e) {
21		if(!$(e.target).closest('._jsCloseOutside, [aria-expanded="true"]').length) {
22
23			$('._jsCloseOutside').each(function() {
24
25				const id = $(this).attr('id');
26
27			 $(`[aria-controls="${id}"]`).attr('aria-expanded', false);
28				$(this).prop('hidden', true);
29			});
30		}
31	});
32
33	// _jsGoBack: go 1 step back in browser history
34	$('._jsGoBack').on('click', function(e) {
35		e.preventDefault();
36		history.go(-1);
37	});
38});

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.