PageSourceSearch

https://www.nettlebed.org/wp-content/themes/square/js/square-custom.js?ver=2.0.30

js nettlebed.org collected 2026-10-03 00:43:42 UTC 3,574 bytes, 129 lines download raw bytes

1/**
2 * Square Custom JS
3 *
4 * @package square
5 *
6 * Distributed under the MIT license - http://opensource.org/licenses/MIT
7 */
8
9jQuery(function ($) {
10
11    $('#sq-bx-slider').owlCarousel({
12        rtl: JSON.parse(square_localize.is_rtl),
13        autoplay: true,
14        items: 1,
15        loop: true,
16        nav: true,
17        dots: false,
18        autoplayTimeout: 7000,
19        animateOut: 'fadeOut',
20        navText: ['<i class="fas fa-chevron-left"></i>', '<i class="fas fa-chevron-right"></i>']
21    });
22
23    $(".sq_client_logo_slider").owlCarousel({
24        rtl: JSON.parse(square_localize.is_rtl),
25        autoplay: true,
26        items: 5,
27        loop: true,
28        nav: false,
29        dots: false,
30        autoplayTimeout: 7000,
31        responsive: {
32            0: {
33                items: 2,
34            },
35            768: {
36                items: 3,
37            },
38            979: {
39                items: 4,
40            },
41            1200: {
42                items: 5,
43            }
44        }
45    });
46
47    $(".sq-tab-pane:first").show();
48    $(".sq-tab li:first").addClass('sq-active');
49
50    $(".sq-tab li a").click(function () {
51        var tab = $(this).attr('href');
52        $(".sq-tab li").removeClass('sq-active');
53        $(this).parent('li').addClass('sq-active');
54        $(".sq-tab-pane").hide();
55        $(tab).show();
56        return false;
57    });
58
59    $(window).scroll(function () {
60        var scrollTop = $(window).scrollTop();
61        if (scrollTop > 0) {
62            $('#sq-masthead').addClass('sq-scrolled');
63        } else {
64            $('#sq-masthead').removeClass('sq-scrolled');
65        }
66    });
67
68    $('.sq-menu > ul').superfish({
69        delay: 500,
70        animation: {opacity: 'show', height: 'show'},
71        speed: 'fast'
72    });
73
74    $('.sq-toggle-nav').click(function () {
75        $('#sq-site-navigation').slideToggle();
76        squareKeyboardLoop($('.sq-main-navigation'));
77        return false;
78    });
79
80    var squareKeyboardLoop = function (elem) {
81
82        var tabbable = elem.find('select, input, textarea, button, a').filter(':visible');
83
84        var firstTabbable = tabbable.first();
85        var lastTabbable = tabbable.last();
86        /*set focus on first input*/
87        firstTabbable.focus();
88
89        /*redirect last tab to first input*/
90        lastTabbable.on('keydown', function (e) {
91            if ((e.which === 9 && !e.shiftKey)) {
92                e.preventDefault();
93                firstTabbable.focus();
94            }
95        });
96
97        /*redirect first shift+tab to last input*/
98        firstTabbable.on('keydown', function (e) {
99            if ((e.which === 9 && e.shiftKey)) {
100                e.preventDefault();
101                lastTabbable.focus();
102            }
103        });
104
105        /* allow escape key to close insiders div */
106        elem.on('keyup', function (e) {
107            if (e.keyCode === 27) {
108                elem.hide();
109            }
110            ;
111        });
112    };
113
114});
115
116if (jQuery('#sq-elasticstack').length > 0) {
117    new ElastiStack(document.getElementById('sq-elasticstack'), {
118        // distDragBack: if the user stops dragging the image in a area that does not exceed [distDragBack]px 
119        // for either x or y then the image goes back to the stack 
120        distDragBack: 200,
121        // distDragMax: if the user drags the image in a area that exceeds [distDragMax]px 
122        // for either x or y then the image moves away from the stack 
123        distDragMax: 450,
124        // callback
125        onUpdateStack: function (current) {
126            return false;
127        }
128    });
129}

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.