PageSourceSearch

https://sophieandlulu.pl/wp-content/themes/lili-blog/assets/js/script.js?ver=20200412

js sophieandlulu.pl collected 2026-10-07 14:20:53 UTC 2,934 bytes, 102 lines download raw bytes

1(function ($) {
2    "use strict";
3    
4    /*==================================
5        key trapped
6        ==================================*/
7
8        var keyTrapped = function (elem) {
9        var tabbable = elem
10          .find('select, input, textarea, button, a')
11          .filter(':visible');
12
13        var firstTabbable = tabbable.first();
14        var lastTabbable = tabbable.last();
15        /*set focus on first input*/
16        firstTabbable.focus();
17
18        /*redirect last tab to first input*/
19        lastTabbable.on('keydown', function (e) {
20          if (e.which === 9 && !e.shiftKey) {
21            e.preventDefault();
22            firstTabbable.focus();
23          }
24        });
25
26        /*redirect first shift+tab to last input*/
27        firstTabbable.on('keydown', function (e) {
28          if (e.which === 9 && e.shiftKey) {
29            e.preventDefault();
30            lastTabbable.focus();
31          }
32        });
33        elem.on('keyup', function (e) {
34          if (e.keyCode === 27) {
35            elem.hide();
36          }
37        });
38        };
39
40        //Js code for search box
41
42    $(".sch-btn").on("click", function () {
43        $(".fa-times").toggleClass("show");
44        $(".fa-search").toggleClass("hide");
45        $(".search-box").slideToggle("");
46        $('.search-box form').find('input.search-field').focus();
47    }); 
48  
49 
50
51  $('.search-box .search-submit').focusout(function () {
52    $(this).closest('.search-box').slideUp();
53    $(".fa-times").toggleClass("show");
54        $(".fa-search").toggleClass("hide");
55  });
56     $(".toggle-menu").on("click", function () { 
57        $(".main-nav.menu-caret").slideToggle("400");
58    }); 
59
60
61    // if (jQuery(window).width() < 991) {
62    //    jQuery('li.menu-item-has-children > a').on('click', function(e) {
63    //         e.preventDefault();
64    //         jQuery(this).next().slideToggle();
65    //     });
66    // }
67
68    if (jQuery(window).width() < 991) {
69    $(
70      '.nav-menu li.menu-item-has-children,.nav-menu li.page-item-has-children'
71    ).prepend(
72      '<span class="dropdown-icon"><i class="fa fa-caret-down"><i></span>'
73    );
74
75    $(
76      '.nav-menu li.menu-item-has-children span.dropdown-icon,.nav-menu li.page-item-has-children span.dropdown-icon'
77    ).on('click', function (e) {
78      e.preventDefault();
79      $(this)
80        .siblings(
81          '.nav-menu li.menu-item-has-children ul.sub-menu,.nav-menu li.page-item-has-children ul.sub-menu'
82        )
83        .slideToggle(300);
84    });
85  } else {
86    $(
87      '.nav-menu li.menu-item-has-children, .nav-menu li.page-item-has-children'
88    )
89      .find('span')
90      .css('display', 'none');
91  }
92        
93function mobileMenuFocus(){
94        
95
96        $('.toggle-menu').on('click', function () {
97          keyTrapped($('.mid'));
98        });
99      }
100
101mobileMenuFocus();
102})(jQuery);

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.