PageSourceSearch

https://europeanfilmgateway.eu/themes/efg/js/efg.faq.js?v=8.9.20

js europeanfilmgateway.eu collected 2026-10-02 03:23:40 UTC 6,038 bytes, 136 lines download raw bytes

1(function ($) {
2    // jQuery(document).ready(function($){
3    $(document).ready(function () {
4        //update these values if you change these breakpoints in the style.css file (or _layout.scss if you use SASS)
5        var MqM = 768,
6            MqL = 1024;
7
8        var faqsSections = $('.cd-faq-group'),
9            faqTrigger = $('.cd-faq-trigger'),
10            faqsContainer = $('.cd-faq-items'),
11            // faqsCategoriesContainer = $('.cd-faq-categories'),
12            // faqsCategories = faqsCategoriesContainer.find('a'),
13            closeFaqsContainer = $('.cd-close-panel');
14
15        // LJ Neu, da kein faqsCategories // Klappt zu
16        faqsContainer.scrollTop(0).addClass('slide-in').children('ul').removeClass('selected').end();
17
18        //select a faq section
19        /*
20        faqsCategories.on('click', function (event) {
21            event.preventDefault();
22            var selectedHref = $(this).attr('href'),
23                target = $(selectedHref);
24            if ($(window).width() < MqM) {
25                faqsContainer.scrollTop(0).addClass('slide-in').children('ul').removeClass('selected').end().children(selectedHref).addClass('selected');
26                closeFaqsContainer.addClass('move-left');
27                $('body').addClass('cd-overlay');
28            } else {
29                $('body,html').animate({'scrollTop': target.offset().top - 19}, 200);
30            }
31        }); */
32
33        //close faq lateral panel - mobile only
34        /*$('body').bind('click touchstart', function (event) {
35            if ($(event.target).is('body.cd-overlay') || $(event.target).is('.cd-close-panel')) {
36                closePanel(event);
37            }
38        }); */
39        /*faqsContainer.on('swiperight', function (event) {
40            closePanel(event);
41        }); */
42
43        //show faq content clicking on faqTrigger
44        faqTrigger.on('click', function (event) {
45            event.preventDefault();
46            $(this).next('.cd-faq-content').slideToggle(200).end().parent('li').toggleClass('content-visible');
47        });
48
49        //update category sidebar while scrolling
50        /*$(window).on('scroll', function () {
51            if ($(window).width() > MqL) {
52                (!window.requestAnimationFrame) ? updateCategory() : window.requestAnimationFrame(updateCategory);
53            }
54        }); */
55
56        /*$(window).on('resize', function () {
57            if ($(window).width() <= MqL) {
58                faqsCategoriesContainer.removeClass('is-fixed').css({
59                    '-moz-transform': 'translateY(0)',
60                    '-webkit-transform': 'translateY(0)',
61                    '-ms-transform': 'translateY(0)',
62                    '-o-transform': 'translateY(0)',
63                    'transform': 'translateY(0)',
64                });
65            }
66            if (faqsCategoriesContainer.hasClass('is-fixed')) {
67                faqsCategoriesContainer.css({
68                    'left': faqsContainer.offset().left,
69                });
70            }
71        }); */
72
73
74        function closePanel(e) {
75
76            e.preventDefault();
77            faqsContainer.removeClass('slide-in').find('li').show();
78            closeFaqsContainer.removeClass('move-left');
79            $('body').removeClass('cd-overlay');
80        }
81
82        /* mobile ..?
83        function updateCategory() {
84            updateCategoryPosition();
85            updateSelectedCategory();
86        } */
87
88        function updateCategoryPosition() {
89            var top = $('.cd-faq').offset().top,
90                height = jQuery('.cd-faq').height() - jQuery('.cd-faq-categories').height(),
91                margin = 20;
92            /*if (top - margin <= $(window).scrollTop() && top - margin + height > $(window).scrollTop()) {
93                var leftValue = faqsCategoriesContainer.offset().left,
94                    widthValue = faqsCategoriesContainer.width();
95                faqsCategoriesContainer.addClass('is-fixed').css({
96                    'left': leftValue,
97                    'top': margin,
98                    '-moz-transform': 'translateZ(0)',
99                    '-webkit-transform': 'translateZ(0)',
100                    '-ms-transform': 'translateZ(0)',
101                    '-o-transform': 'translateZ(0)',
102                    'transform': 'translateZ(0)',
103                });
104            } else if (top - margin + height <= $(window).scrollTop()) {
105                var delta = top - margin + height - $(window).scrollTop();
106                faqsCategoriesContainer.css({
107                    '-moz-transform': 'translateZ(0) translateY(' + delta + 'px)',
108                    '-webkit-transform': 'translateZ(0) translateY(' + delta + 'px)',
109                    '-ms-transform': 'translateZ(0) translateY(' + delta + 'px)',
110                    '-o-transform': 'translateZ(0) translateY(' + delta + 'px)',
111                    'transform': 'translateZ(0) translateY(' + delta + 'px)',
112                });
113            } else {
114                faqsCategoriesContainer.removeClass('is-fixed').css({
115                    'left': 0,
116                    'top': 0,
117                });
118            } */
119        }
120
121        function updateSelectedCategory() {
122            faqsSections.each(function () {
123                var actual = $(this),
124                    margin = parseInt($('.cd-faq-title').eq(1).css('marginTop').replace('px', '')); // semikolon anstatt komma weil activecategory comment
125                    // activeCategory = $('.cd-faq-categories a[href="#' + actual.attr('id') + '"]'),
126                    //topSection = (activeCategory.parent('li').is(':first-child')) ? 0 : Math.round(actual.offset().top);
127
128                if (( topSection - 20 <= $(window).scrollTop() ) && ( Math.round(actual.offset().top) + actual.height() + margin - 20 > $(window).scrollTop() )) {
129                    activeCategory.addClass('selected');
130                } else {
131                    activeCategory.removeClass('selected');
132                }
133            });
134        }
135    }); // document ready
136})(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.