PageSourceSearch

https://www.nik.gov.pl/p/js/global.js

js nik.gov.pl collected 2026-10-02 03:09:20 UTC 2,543 bytes, 101 lines download raw bytes

1NikJS = {};
2
3jQuery(document).ready(function() {
4    NikJS.searchButton();
5    NikJS.searchToggle();
6    NikJS.hamburgerMenu();
7});
8
9jQuery(window).on("load", function() {
10
11});
12
13NikJS.searchButton = function() {
14
15    var searchButton = jQuery('.search--mini .search__button');
16    var searchInput = jQuery('.search--mini input#wyszukiwarka_mini');
17    var navTop = jQuery('.nav--top');
18
19    if ( searchButton.length > 0 ) {
20        searchButton.on( "click", function(e) {
21            jQuery(this).prev().toggleClass("is-active");
22
23            var windowInnerWith = window.innerWidth;
24
25            if (windowInnerWith >= 992) {
26                navTop.toggleClass('search-is-open');
27            }
28
29            e.preventDefault();
30            searchInput.focus();
31        });
32    }
33
34    jQuery(document).click(function(e) {
35        if ( jQuery(e.target).closest('.search__button, .search__box').length === 0 ) {
36            jQuery('.nav--top').removeClass('search-is-open');
37            jQuery('.search__box').removeClass('is-active');
38        }
39    });
40
41};
42
43NikJS.searchToggle = function() {
44
45    jQuery(".search__button-collapse").on( "click", function(e) {
46
47        var searchCollapseButton = jQuery(this);
48        var searchCollapseBox = jQuery('.search__box-collapse');
49
50        searchCollapseBox.toggleClass('is-open');
51        searchCollapseButton.toggleClass('is-active').html('Szukanie proste');
52
53        if ( searchCollapseBox.is(":hidden")) {
54            searchCollapseButton.html('Więcej opcji wyszukiwania');
55        }
56
57        e.preventDefault();
58    });
59
60};
61
62
63NikJS.hamburgerMenu = function() {
64    var hmButton = jQuery('#nav-hamburger');
65    var navTop = jQuery('.nav--top');
66
67    if (hmButton.length > 0 ) {
68        jQuery(hmButton).on( "click", function(e) {
69            jQuery(this).toggleClass('is-active');
70            navTop.toggleClass('is-open');
71
72            e.preventDefault();
73        });
74    }
75};
76
77//Scroll
78jQuery(window).on('scroll', function() {
79
80var windowInnerWith = window.innerWidth;
81
82if (windowInnerWith >= 992) {
83    if (jQuery(window).scrollTop() > 50) {
84        jQuery('.header__bottom').addClass('header__bottom--sticky');
85    } else {
86        jQuery('.header__bottom').removeClass('header__bottom--sticky');
87    }
88}
89});
90
91//Resize
92jQuery(window).on('resize', function() {
93var windowInnerWith = window.innerWidth;
94
95if (windowInnerWith >= 992) {
96    jQuery('.header__bottom').removeClass('header__bottom--sticky');
97
98} else {}
99});
100
101document.getElementsByTagName("html")[0].removeAttribute("slick-uniqueid");

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.