PageSourceSearch

https://kerteminde-sejlklub.dk/wp-content/themes/number-three-one-child/script.js?ver=1713790619

js kerteminde-sejlklub.dk collected 2026-10-10 01:45:51 UTC 9,271 bytes, 246 lines download raw bytes

1(function($) {
2
3    /*======================================================================//
4    // script.js                                                            //
5    //======================================================================*/
6
7    $(document).ready(function() {
8        // Sticky headere on scroll
9        jQuery(window).scroll(function() {
10            var scroll = jQuery(window).scrollTop();
11
12            if (scroll >= 41) {
13                jQuery("body").addClass("scroll");
14            } else {
15                jQuery("body").removeClass("scroll");
16            }
17        });
18
19    });
20
21    $(window).on('load', function() {
22        // code goes here
23    });
24
25
26    var elementsToAnimate = document.querySelectorAll('.stom-animation');
27    if (elementsToAnimate) {
28
29        var scroll = window.requestAnimationFrame ||
30            function(callback) { window.setTimeout(callback, 1000 / 60) };
31
32        function loop() {
33            elementsToAnimate.forEach(function(element) {
34                if (isElementInViewport(element)) {
35                    element.classList.add('is-visible');
36                } else {
37                    element.classList.remove('is-visible');
38                }
39            });
40            scroll(loop);
41        }
42        loop();
43
44        function isElementInViewport(el) {
45            if (typeof jQuery === "function" && el instanceof jQuery) {
46                el = el[0];
47            }
48            var rect = el.getBoundingClientRect();
49            return (
50                (rect.top <= 0 &&
51                    rect.bottom >= 0) ||
52                (rect.bottom >= (window.innerHeight || document.documentElement.clientHeight) &&
53                    rect.top <= (window.innerHeight || document.documentElement.clientHeight)) ||
54                (rect.top >= 0 &&
55                    rect.bottom <= (window.innerHeight || document.documentElement.clientHeight))
56            );
57        }
58
59    }
60
61    // Custom Events slick slider
62    STOM.pageSliderService = function() {
63        if (!$('.calendar .events-container').length) return;
64        if (jQuery.fn.slick) {
65            $('.calendar .events-container').slick({
66                    dots: false,
67                    prevArrow: '<button type="button" class="slick-prev">' + stomFaIcons.slick.buttonPrevArrow + '</button>',
68                    nextArrow: '<button type="button" class="slick-next">' + stomFaIcons.slick.buttonNextArrow + '</button>',
69                    lazyLoad: 'progressive',
70                    speed: 175,
71                    draggable: true,
72                    arrows: true,
73                    prevArrow: '<button type="button" class="slick-prev">' + stomFaIcons.slick.buttonPrev + '</button>',
74                    nextArrow: '<button type="button" class="slick-next">' + stomFaIcons.slick.buttonNext + '</button>',
75                    dots: false,
76                    autoplay: true,
77                    autoplaySpeed: 4000,
78                    slidesToShow: 5,
79                    centerMode: true,
80                    slidesToScroll: 1,
81                    responsive: [{
82                            breakpoint: 1921,
83                            settings: {
84                                slidesToShow: 4,
85                                slidesToScroll: 1
86                            }
87                        },
88                        {
89                            breakpoint: 1201,
90                            settings: {
91                                slidesToShow: 3,
92                                slidesToScroll: 1
93                            }
94                        },
95                        {
96                            breakpoint: 960,
97                            settings: {
98                                slidesToShow: 2,
99                                slidesToScroll: 1
100                            }
101                        },
102                        {
103                            breakpoint: 640,
104                            settings: {
105                                slidesToShow: 1,
106                                slidesToScroll: 1
107                            }
108                        }
109                    ],
110                })
111                // .on('setPosition', function(event, slick) {
112                //     slick.$slides.css('height', slick.$slideTrack.height() + 'px');
113                // });
114        } else {
115            pre('Slick Slider Could\'t Initialize');
116        }
117    }
118    STOM.pageSliderService();
119
120    
121    // Simple slick slider
122    if (!function_exists('slickSliderHandler')) {
123        STOM.slickSliderHandler = function() {
124            if (!$('.stom-simple-slider').length) return;
125
126            if (jQuery.fn.slick) {
127                $('.stom-simple-slider').slick({
128                        lazyLoad: 'progressive',
129                        speed: 175,
130                        draggable: true,
131                        arrows: true,
132                        prevArrow: '<button type="button" class="slick-prev">' + stomFaIcons.slick.buttonPrev + '</button>',
133                        nextArrow: '<button type="button" class="slick-next">' + stomFaIcons.slick.buttonNext + '</button>',
134                        dots: true,
135                        autoplay: true,
136                        autoplaySpeed: 4000,
137                        slidesToShow: 5,
138                        centerMode: false,
139                        slidesToScroll: 1,
140                        responsive: [{
141                                breakpoint: 1200,
142                                settings: {
143                                    slidesToShow: 3,
144                                    slidesToScroll: 3
145                                }
146                            },
147                            {
148                                breakpoint: 959,
149                                settings: {
150                                    slidesToShow: 3,
151                                    slidesToScroll: 3
152                                }
153                            },
154                            {
155                                breakpoint: 639,
156                                settings: {
157                                    slidesToShow: 3,
158                                    slidesToScroll: 3
159                                }
160                            }
161                        ],
162                    })
163                    .on('setPosition', function(event, slick) {
164                        slick.$slides.css('height', slick.$slideTrack.height() + 'px');
165                    });
166            } else {
167                pre('Slick Slider Could\'t Initialize');
168            }
169        }
170        STOM.slickSliderHandler();
171    }
172
173
174
175    $(document).on('click', '.stom-medarbejder-read-more a', function(e) {
176        e.preventDefault();
177
178        $(this).closest('.stom-medarbejder-wrapper').addClass('popup-active');
179    });
180
181    $(document).on('click', '.stom-medarbejder-popup-close a', function(e) {
182        e.preventDefault();
183
184        $(this).closest('.stom-medarbejder-wrapper').removeClass('popup-active');
185    });
186
187    $(document).on('click', '.stom-medarbejder-popup', function(e) {
188        if (e.target === this) {
189            $(this).closest('.stom-medarbejder-wrapper').removeClass('popup-active');
190        }
191    });
192
193
194
195	// pre(DmiApiData);
196
197	$.ajax({
198        url: DmiApiData.ajaxUrl,
199        data: {
200            'action': 'stom_dmi_async_request',
201        },
202        success:function(data) {
203            console.log(data);
204
205			if (typeof data != 'undefined' && data != '' && JSON.parse(data)) {
206				data = JSON.parse(data);
207
208				var windSpeed = data.wind_speed,
209					windDir = data.wind_dir,
210					temp = data.temp;
211
212				$('.current-weather-bubble .current-weather-bubble-detail.wind-dir').css('transform', 'rotateZ(' + (windDir ? (180 + windDir) : '0') + 'deg)');
213				$('.current-weather-bubble .current-weather-bubble-detail.wind-speed .weather-bubble-value').text(windSpeed);
214				$('.current-weather-bubble .current-weather-bubble-detail.temp .weather-bubble-value').text(temp);
215			}
216        },
217        error: function(errorThrown){
218            console.log(errorThrown);
219        }
220    });
221
222    /*======================================================================//
223    // END script.js                                                        //
224    //======================================================================*/
225
226
227
228    /*======================================================================//
229    // woocommerce.js                                                       //
230    //======================================================================*/
231
232    $(document).ready(function() {
233        // code goes here
234    });
235
236
237
238    $(window).on('load', function() {
239        // code goes here
240    });
241
242    /*======================================================================//
243    // END woocommerce.js                                                   //
244    //======================================================================*/
245
246})(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.