PageSourceSearch

https://www.zookrefeld.de/typo3conf/ext/zoo_setup/Resources/Public/js/main.js?1759313984

js zookrefeld.de collected 2026-10-02 11:11:08 UTC 9,638 bytes, 333 lines download raw bytes

1var scrollOffset = 120;
2var moveInOffset = 120;
3var headerMatchMediaAnimationOn = "(min-width: 992px)";
4var isNewsSlick = false;
5
6/* jquery passiv listener fix */
7jQuery.event.special.touchstart = {
8    setup: function( _, ns, handle ) {
9        this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") });
10    }
11};
12jQuery.event.special.touchmove = {
13    setup: function( _, ns, handle ) {
14        this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") });
15    }
16};
17jQuery.event.special.wheel = {
18    setup: function( _, ns, handle ){
19        this.addEventListener("wheel", handle, { passive: true });
20    }
21};
22jQuery.event.special.mousewheel = {
23    setup: function( _, ns, handle ){
24        this.addEventListener("mousewheel", handle, { passive: true });
25    }
26};
27
28
29document.addEventListener('scroll', function (event) {
30    let header =  document.getElementById("header")
31    if(window.matchMedia(headerMatchMediaAnimationOn).matches){
32        let top = (window.pageYOffset || document.documentElement.scrollTop)  - (document.documentElement.clientTop || 0);
33        if(top > moveInOffset){
34            header.classList.add('fixed');
35        }else{
36            header.classList.remove('fixed');
37        }
38    }else{
39        header.classList.remove('fixed');
40    }
41}, true );
42
43
44
45var menu = new MmenuLight(
46    document.querySelector( '#menu' ),
47    'all'
48);
49
50var navigator = menu.navigation({
51    // selectedClass: 'Selected',
52    // slidingSubmenus: true,
53     theme: 'zoo',
54    // title: 'Menu'
55});
56
57var drawer = menu.offcanvas({
58     position: 'right'
59});
60
61//	Open the menu.
62document.querySelector( 'button[id="navbar-toggler"]' )
63    .addEventListener( 'click', evnt => {
64        evnt.preventDefault();
65        drawer.open();
66    });
67
68
69
70
71$(function () {
72
73   // scrollOffset = $('#header').height();
74
75    jQuery.fn.randomize = function (selector) {
76        var $elems = selector ? jQuery(this).find(selector) : jQuery(this).children(),$parents = $elems.parent();
77        $parents.each(function () {
78            jQuery(this).children(selector).sort(function (childA, childB) {
79                if(jQuery(childB).index() !== jQuery(this).children(selector).length - 1) {
80                    return Math.round(Math.random()) - 0.5;
81                }
82            }.bind(this)).detach().appendTo(this);
83        });
84        return this;
85    };
86
87    //container breakout resize
88    $(window).on('resize',function(){
89
90        //scrollOffset = $('#header').height();
91
92        $('.break-container,.break-container-left,.break-container-right').each(function(){
93            let containerWidth = $( '.container:first' ).width();
94            let containerSpace = ($( window ).width() - containerWidth) / 2;
95            let maxWidth = $(this).css('max-width').replace('%','');
96            let spacing = maxWidth<100?45:0;
97            let newWidth = (((containerWidth/100)*maxWidth))-spacing+containerSpace;
98            $(this).find(">:first-child").width(newWidth);
99        });
100
101        /*  */
102        if(window.matchMedia(headerMatchMediaAnimationOn).matches && isNewsSlick){
103            $('.news-list-slider-view .row').slick('unslick');
104            isNewsSlick = false;
105        }else if(!window.matchMedia(headerMatchMediaAnimationOn).matches && !isNewsSlick){
106            $('.news-list-slider-view .row').slick({
107                infinite: true,
108                slidesToShow: 1,
109                slidesToScroll: 1,
110                responsive: [
111
112                    {
113                        breakpoint: 767,
114                        settings: {
115                            slidesToShow: 1,
116                            slidesToScroll: 1,
117                        }
118                    }
119                ]}
120            );
121            isNewsSlick = true
122        }
123
124
125        /* */
126
127
128
129
130    }).triggerHandler("resize");
131
132
133
134    $('.news-list-view').equalizedInRows({childSelector:'.text-header'});
135    //$('.row-linkbox').equalizedInRows({childSelector:'.header'});
136    $('.frame-type-gridelements_pi1').equalizedInRows({childSelector:'.frame-type-mask_teaser .text-header'});
137
138    // first header with tear-off and space after large
139    $('#content > .frame-type-header:first-child:not(.frame-color-green-tear-off-edge-top), #content > .frame-type-header:nth-child(2):not(.frame-color-green-tear-off-edge-top)').first().addClass('frame-color-white-tear-off-edge-top');
140
141
142    //
143
144    $('.tierwelt-slider').randomize().show().slick({
145        infinite: true,
146        slidesToShow: 3,
147        slidesToScroll: 3,
148        prevArrow:'<button type="button" class="slick-prev">prev</button>',
149        nextArrow:'<button type="button" class="slick-next">next</button>',
150        responsive: [
151            {
152                breakpoint: 1199,
153                settings: {
154                    slidesToScroll: 2,
155                    slidesToShow: 2
156                }
157            },
158            {
159                breakpoint: 576,
160                settings: {
161                    slidesToShow: 1,
162                    slidesToScroll: 1,
163                }
164            }
165        ]
166    });
167
168    $('.textimage-slider').show().slick({
169        infinite: true,
170        slidesToShow: 3,
171        slidesToScroll: 3,
172        prevArrow:'<button type="button" class="slick-prev">prev</button>',
173        nextArrow:'<button type="button" class="slick-next">next</button>',
174        responsive: [
175            {
176                breakpoint: 1200,
177                settings: {
178                    slidesToScroll: 2,
179                    slidesToShow: 2
180                }
181            },
182            {
183                breakpoint: 576,
184                settings: {
185                    slidesToShow: 1,
186                    slidesToScroll: 1,
187                }
188            }
189        ]
190    });
191
192    $('.image-slider').show().slick({
193        infinite: true,
194        slidesToShow: 3,
195        slidesToScroll: 3,
196        prevArrow:'<button type="button" class="slick-prev">prev</button>',
197        nextArrow:'<button type="button" class="slick-next">next</button>',
198        responsive: [
199            {
200                breakpoint: 1199,
201                settings: {
202                    slidesToScroll: 2,
203                    slidesToShow: 2
204                }
205            },
206            {
207                breakpoint: 576,
208                settings: {
209                    slidesToShow: 1,
210                    slidesToScroll: 1,
211                }
212            }
213        ]
214    });
215
216
217
218    $('.row-linkblock-slider').slick({
219        infinite: true,
220        slidesToShow: 4,
221        slidesToScroll: 4,
222        prevArrow:'<button type="button" class="slick-prev">prev</button>',
223        nextArrow:'<button type="button" class="slick-next">next</button>',
224        arrows: false,
225        responsive: [
226
227            /*    {
228                   breakpoint: 1200,
229                   settings: {
230                       arrows: false,
231                       slidesToScroll: 4,
232                       slidesToShow: 4
233                   }
234            },*/
235            {
236                breakpoint: 1199,
237                settings: {
238                    arrows: true,
239                    slidesToScroll: 2,
240                    slidesToShow: 2
241                }
242            },
243            {
244                breakpoint: 560,
245                settings: {
246                    arrows: true,
247                    slidesToShow: 1,
248                    slidesToScroll: 1,
249                }
250            }
251        ]
252
253    });
254
255
256/*
257    $('.event-tile').isotope({
258        itemSelector: '.event-tile-item',
259        percentPosition: true,
260        layoutMode: 'packery',
261
262
263    })
264*/
265
266
267
268
269    $('a').on('click', function () {
270        if (this.hash && this.pathname == window.location.pathname &&
271            this.protocol == window.location.protocol &&
272            this.host == window.location.host &&
273            !$(this).hasClass('nav-link')) {
274            e.preventDefault();
275            $(document).off("scroll");
276            var $target = $(this.hash);
277            console.log($target);
278            if ($target.length) {
279                console.log(scrollOffset);
280                $('html, body').stop().animate({
281                    'scrollTop': $target.offset().top - scrollOffset
282                }, 500, 'swing');
283            }
284        }
285    });
286    if(window.location.hash) {
287        var $target = $( window.location.hash);
288        if($target){
289            $('html, body').stop().animate({
290                'scrollTop': ($target.offset().top - scrollOffset)
291            }, 1000, 'swing');
292        }
293    }
294
295
296});
297
298
299$(window).on("load", function() {
300  //  $('.frame-type-gridelements_pi1').equalizedInRows({childSelector:'.tx-dce-pi1 .ce-bodytext'});
301
302
303});
304
305$(document).ready(function(){
306
307    //Translation
308    $("#translate-button").click(function(event){
309        event.preventDefault();
310        $("#div1").load("/fileadmin/Translation/translate.html");
311        $("#translate-box").hide();
312    });
313    $("#languageDropdownMenuButton").click(function(event){
314        event.preventDefault();
315        $(".languagedropdownmenu").toggle();
316    });
317
318    // Warning-Teaser
319    $('.frame-layout-101').click(function(){
320        $(this).fadeOut(320);
321    })
322
323    const queryString = window.location.search;
324    const urlParams = new URLSearchParams(queryString);
325    const news_page = urlParams.get('tx_news_pi1[currentPage]')
326    if (news_page != "" && news_page != null && news_page != "null") {
327        var $container = $("html,body");
328        var $scrollTo = $('.news');
329
330        $container.animate({'scrollTop': $scrollTo.offset().top - scrollOffset},
331            500, 'swing');
332    }
333});

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.