PageSourceSearch

https://www.vvspartanijkerk.nl/wp-content/themes/DraadCore-child/js/menu.js

js vvspartanijkerk.nl collected 2026-10-02 22:07:46 UTC 8,065 bytes, 211 lines download raw bytes

1$ = $ || jQuery.noConflict();
2$(document).bind('gform_post_render', function() {
3    $('input[type=text]').closest('.gfield').addClass('text');
4    $('input[type=radio]').closest('.gfield').addClass('radio');
5    $('select').closest('.gfield').addClass('select');
6    $('input[type=checkbox]').closest('.gfield').addClass('checkbox');
7    $('textarea').closest('.gfield').addClass('textbox');
8    $('input[type=text]').focus(function() {
9        $(this).closest('.gfield').addClass('focus');
10    });
11    $('textarea').focus(function() {
12        $(this).closest('.gfield').addClass('focus');
13    });
14
15
16});
17
18$(document).ready(function() {
19    $('input').each(function() { if ($(this).val() != '') { $(this).closest('li').addClass('focus'); } });
20});
21
22
23
24// $(window).on('load', function(e) {
25//     // Hide the div
26//     $("#header").hide();
27//     $("#av_section_3").hide();
28
29
30
31//     // Show the div in 2s
32//     $("#header").delay(1500).fadeIn(500);
33//     $("#av_section_3").delay(2000).fadeIn(500);
34
35// });
36
37
38
39
40$(document).ready(function() {
41    $("#main > .av-section-bottom-logo").detach().appendTo("#header");
42    $('#top.page-id-406 #av-tab-section-1 .av-section-tab-title[data-av-tab-section-title=8]').attr('href', '/vereniging/ledenadministratie/niet-spelend-lid-seizoenskaart/').on('click', function(e) {
43        e.preventDefault();
44        window.location = $(this).attr('href');
45    });
46    $('#top.page-id-746 a[href*="/businessclub/contact/"]').attr('href', '/contact/#tab_5').on('click', function(e) {
47        e.preventDefault();
48        window.location = $(this).attr('href');
49    });
50
51    $(document).on('click', '.question', function (){
52            console.log('test1234321');
53        if ($(this).closest('.qa').hasClass('open')) {
54            console.log('test12343212');
55            $(this).closest('.qa').removeClass('open');
56        } else {
57            console.log('test12343213');
58            $(this).closest('.qa').addClass('open');
59        }
60    });
61
62    // $('.question').click(function(e) {
63    //     console.log('test1234321');
64    //     if ($(this).closest('.qa').hasClass('open')) {
65    //         console.log('test12343212');
66    //         $(this).closest('.qa').removeClass('open');
67    //     } else {
68    //         console.log('test12343213');
69    //         $(this).closest('.qa').addClass('open');
70    //     }
71    // });
72    $('#header .ubermenu-responsive-toggle').on('ubermenutoggledopen', function() {
73        $('#header_meta').addClass('collapse');
74    });
75    $('#header .ubermenu-responsive-toggle').on('ubermenutoggledclose', function() {
76        $('#header_meta').removeClass('collapse');
77    });
78    $('body').on('click', '.sparta-megamenu .ubermenu-target', function() {
79        console.log('click ubermenu', $('.ubermenu-item-level-0.ubermenu-active').length);
80        if ($('.ubermenu-item-has-children').hasClass('ubermenu-active')) {
81            $('#av_section_1').addClass('blur');
82            $('#header').addClass('avia-ubermenu-active');
83        }
84    });
85    $('body').on('ubermenuclose', '.ubermenu-item-has-children', function() {
86        console.log('ubermenu close', $('.ubermenu-item-level-0.ubermenu-active').length);
87        window.setTimeout(function() {
88            if ($('.ubermenu-item-level-0.ubermenu-active').length == 0) {
89                $('#av_section_1').removeClass('blur');
90                $('#header').removeClass('avia-ubermenu-active');
91            }
92        }, 100);
93    });
94    tmpval = $('.ginput_container input').val();
95    if ($('input[type=text]').focusout(function() {
96            if (!$(this).val()) {
97                $(this).closest('.gfield').removeClass('focus');
98            }
99        }));
100    if ($('textarea').focusout(function() {
101            if (!$(this).val()) {
102                $(this).closest('.gfield').removeClass('focus');
103            }
104        }));
105
106});
107$(document).ready(function() {
108    const tabletS = window.matchMedia("(max-width: 989px)");
109    if (tabletS.matches) {
110        $('.sportlink-container #tab-id-1-container .avia-button-wrap .avia_iconbox_title').text('Bekijk het programma');
111    }
112    const phone = window.matchMedia("(max-width: 767px)");
113    if (phone.matches) {
114        $('.sportlink-container #tab-id-1-container .avia-button-wrap .avia_iconbox_title').text('Volledig programma');
115    }
116    setTimeout(function() {
117        $('.gform_page_fields li').each(function() {
118            if ($('input').val() != '') {
119                console.log('vol');
120                $(this).closest('.gfield').addClass('focus');
121            } else {
122                $(this).closest('.gfield').removeClass('focus');
123                console.log('leeg');
124            }
125        });
126    }, 2000);
127});
128$(document).on('program:loaded', function() {
129    $('tr td a.link').text('Meer informatie');
130    $('tr td a.link').on('click', function() {
131        $(this).closest('tr').toggleClass('active_row');
132        $(this).text($(this).text() === 'Meer informatie' ? 'Minder informatie' : 'Meer informatie');
133    });
134});
135$(document).ready(function() {
136    const mq2 = window.matchMedia("(max-width: 1139px)");
137    if (mq2.matches) {
138        $('.maps a').text('Plan route');
139    }
140    window.setTimeout(function() {
141        $('a.av-section-tab-title[href="/vereniging/ledenadministratie/niet-spelend-lid-seizoenskaart/"]').unbind('click').on('click', function(e) {
142            e.preventDefault();
143            e.stopPropagation();
144            window.location = $(this).attr('href');
145        });
146    }, 200);
147});
148$(window).on('resize', function(e) {
149    if (window.resizeCallbackTimeout) {
150        window.clearTimeout(window.resizeCallbackTimeout);
151    }
152    window.resizeCallbackTimeout = window.setTimeout(function() {
153        $('.av-tab-section-container').each(function() {
154            var $element = $(this);
155            var offset = 230;
156            if ($('body').hasClass('page-id-406')) {
157                if ($(window).width() < 600) {
158                    offset = 800;
159                } else if ($(window).width() < 800) {
160                    offset = 600;
161                }
162            }
163            var newMaxHeight = $element.find('.av-tab-section-outer-container').find('.av-layout-tab.av-active-tab-content .container').outerHeight() + offset;
164            $element.find('.av-tab-section-outer-container').css({
165                maxHeight: (newMaxHeight)
166            });
167        });
168    }, 250);
169}).trigger('resize');
170var userAgent, ieReg, ie;
171userAgent = window.navigator.userAgent;
172ieReg = /msie|Trident.*rv[ :]*11\./gi;
173ie = ieReg.test(userAgent);
174if (ie) {
175    $(".sparta-nieuws .avia-image-container-inner").each(function() {
176        var $container = $(this),
177            imgUrl = $container.find("img").prop("src");
178        if (imgUrl) {
179            $container.css("backgroundImage", 'url(' + imgUrl + ')').addClass("custom-object-fit");
180        }
181    });
182} else {
183    const mq = window.matchMedia("(min-width: 990px)");
184    if (mq.matches) {
185        setTimeout(function() {
186            function menuScroll() {
187                var scrollTop = $(window).scrollTop();
188                var elementOffset = $('#top').offset().top;
189                var currentElementOffset = elementOffset - scrollTop;
190                var header = $('#header');
191                if (currentElementOffset >= -90) {
192                    $(header).css('margin-top', currentElementOffset + "px");
193                } else {
194                    $(header).css('margin-top', '-90px');
195                    $(header).css('position', 'fixed');
196                }
197            }
198            $(window).scroll(function() {
199                menuScroll();
200                if ($(this).scrollTop() > 75) {
201                    $('#header').addClass('scrolled');
202                } else if ($(this).scrollTop() > 10) {
203                    $('#shiftnav-toggle-main').addClass('scrolled');
204                } else {
205                    $('#header').removeClass('scrolled');
206                    $('#shiftnav-toggle-main').removeClass('scrolled');
207                }
208            });
209        }, 300);
210    }
211}

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.