PageSourceSearch

https://annexcopenhagen.dk/wp-content/themes/patara/includes/js/custom.js?ver=2.2.0

js annexcopenhagen.dk collected 2026-10-06 20:16:15 UTC 6,906 bytes, 188 lines download raw bytes

1/* -------------------------------------------------------
2
301. ScrollIt
402. Navbar scrolling background
503. Close navbar-collapse when a  clicked
604. Sections background image from data background 
705. Animations
816. Client 
917. Accordion Box (for Faqs)
1018. Accordion Menu
1119. MagnificPopup Gallery
1220. Smooth Scrolling
1321. Scroll back to top
1422. Select2
1523. Datepicker
1624. Slider
1725. Preloader
1826. Contact Form
19
20
21------------------------------------------------------- */
22jQuery(function () {
23    "use strict";
24    var wind = jQuery(window);
25    
26    // ScrollIt
27    jQuery.scrollIt({
28        upKey: 38, // key code to navigate to the next section
29        downKey: 40, // key code to navigate to the previous section
30        easing: 'swing', // the easing function for animation
31        scrollTime: 600, // how long (in ms) the animation takes
32        activeClass: 'active', // class given to the active nav element
33        onPageChange: null, // function(pageIndex) that is called when page is changed
34        topOffset: -70 // offste (in px) for fixed top navigation
35    });
36    
37    // Navbar scrolling background
38    // Close navbar-collapse when a  clicked
39
40    
41    // Sections background image from data background
42    var pageSection = jQuery(".bg-img, section");
43    pageSection.each(function (indx) {
44        if (jQuery(this).attr("data-background")) {
45            jQuery(this).css("background-image", "url(" + jQuery(this).data("background") + ")");
46        }
47		if (jQuery(this).attr("data-position")){
48            jQuery(this).css("background-position", "" + jQuery(this).data("position") + "");
49        }
50		if (jQuery(this).attr("data-size")){
51            jQuery(this).css("background-size", "" + jQuery(this).data("size") + "");
52        }		
53    });
54    
55    // Animations
56    var contentWayPoint = function () {
57        var i = 0;
58        jQuery('.animate-box').waypoint(function (direction) {
59            if (direction === 'down' && !jQuery(this.element).hasClass('animated')) {
60                i++;
61                jQuery(this.element).addClass('item-animate');
62                setTimeout(function () {
63                    jQuery('body .animate-box.item-animate').each(function (k) {
64                        var el = jQuery(this);
65                        setTimeout(function () {
66                            var effect = el.data('animate-effect');
67                            if (effect === 'fadeIn') {
68                                el.addClass('fadeIn animated');
69                            } else if (effect === 'fadeInLeft') {
70                                el.addClass('fadeInLeft animated');
71                            } else if (effect === 'fadeInRight') {
72                                el.addClass('fadeInRight animated');
73                            } else {
74                                el.addClass('fadeInUp animated');
75                            }
76                            el.removeClass('item-animate');
77                        }, k * 200, 'easeInOutExpo');
78                    });
79                }, 100);
80            }
81        }, {
82            offset: '85%'
83        });
84    };
85    jQuery(function () {
86        contentWayPoint();
87    });
88    // Initiate the wowjs
89    new WOW().init();
90    
91    // YouTubePopUp
92    jQuery("a.vid").YouTubePopUp();
93    
94    
95    
96    // Accordion Menu
97    if (jQuery(".accordion-menu").length) {
98        jQuery(".accordion-menu").on("click", ".acc-btn", function () {
99            var outerBox = jQuery(this).parents(".accordion-menu");
100            var target = jQuery(this).parents(".accordion");
101            if (jQuery(this).next(".acc-content").is(":visible")) {
102                //return false;
103                jQuery(this).removeClass("active");
104                jQuery(this).next(".acc-content").slideUp(300);
105                jQuery(outerBox).children(".accordion").removeClass("active-block");
106            } else {
107                jQuery(outerBox).find(".accordion .acc-btn").removeClass("active");
108                jQuery(this).addClass("active");
109                jQuery(outerBox).children(".accordion").removeClass("active-block");
110                jQuery(outerBox).find(".accordion").children(".acc-content").slideUp(300);
111                target.addClass("active-block");
112                jQuery(this).next(".acc-content").slideDown(300);
113            }
114        });
115    }
116    
117    // MagnificPopup Gallery
118    jQuery('.gallery').magnificPopup({
119        delegate: '.popimg',
120        type: 'image',
121        gallery: {
122            enabled: true
123        }
124    });
125    jQuery(".img-zoom").magnificPopup({
126        type: "image",
127        closeOnContentClick: !0,
128        mainClass: "mfp-fade",
129        gallery: {
130            enabled: !0,
131            navigateByImgClick: !0,
132            preload: [0, 1]
133        }
134    })
135    jQuery('.magnific-youtube, .magnific-vimeo, .magnific-custom').magnificPopup({
136        disableOn: 700,
137        type: 'iframe',
138        mainClass: 'mfp-fade',
139        removalDelay: 300,
140        preloader: false,
141        fixedContentPos: false
142    });
143    jQuery('.image-popup-vertical-fit').magnificPopup({
144        type: 'image',
145        closeOnContentClick: true,
146        mainClass: 'mfp-img-mobile',
147        image: {
148            verticalFit: true
149        }
150    });
151
152    // Smooth Scrolling
153    jQuery('a[href*="#"]')
154    // Remove links that don't actually link to anything
155    .not('[href="#"]').not('[href="#0"]').click(function (event) {
156            // On-page links
157            if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
158                // Figure out element to scroll to
159                var target = jQuery(this.hash);
160                target = target.length ? target : jQuery('[name=' + this.hash.slice(1) + ']');
161                // Does a scroll target exist?
162                if (target.length) {
163                    // Only prevent default if animation is actually gonna happen
164                    event.preventDefault();
165                    jQuery('html, body').animate({
166                        scrollTop: target.offset().top
167                    }, 1000, function () {
168                        // Callback after animation
169                        // Must change focus!
170                        var jQuerytarget = jQuery(target);
171                        jQuerytarget.focus();
172                        if (jQuerytarget.is(":focus")) { // Checking if the target was focused
173                            return false;
174                        } else {
175                            jQuerytarget.attr('tabindex', '-1'); // Adding tabindex for elements not focusable
176                            jQuerytarget.focus(); // Set focus again
177                        };
178                    });
179                }
180            }
181        });
182    
183});
184
185// Preloader
186jQuery("#preloader").fadeOut(700);
187jQuery(".preloader-bg").delay(700).fadeOut(700);
188

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.