PageSourceSearch

https://www.welcometomonarchlanding.com/wp-content/themes/theme-gd…/assets/scripts/plugins/magnific-init.js

js welcometomonarchlanding.com collected 2026-09-26 06:42:12 UTC 5,176 bytes, 133 lines download raw bytes

1/** ========================================================================
2 * Magnific Popup Implemenation
3 * These scripts are the standard uses for popups.
4 * ======================================================================== */
5(function ($) {
6    
7    // Video Calls
8    $('.popup-video, a[href*="player.vimeo"], a[href*="youtube.com/embed"]').magnificPopup({
9        type: 'iframe',
10        removalDelay: 500,
11        mainClass: 'mfp-fade',
12        closeOnContentClick: false,
13        callbacks: {
14            // markupParse is fired on every load/change
15            markupParse: function (template, values, item) {
16                // This sets up the title to pull from the currItem
17                values.title = item.el.attr('title');
18            },
19            // open fires only on the initial load.
20            open: function () {
21                if (this + '[href*="player.vimeo"]') {
22                    // For Vimeo Tracking
23                    /* jshint ignore:start */
24                    "undefined" != typeof bindVimeoGA && typeof bindVimeoGA == typeof Function && bindVimeoGA(this.currItem.el)
25                    /* jshint ignore:end */
26                }
27            }
28        }
29    });
30    $('.imagePop').each(function() {
31        $(this).magnificPopup({
32            type: 'image',
33            removalDelay: 500,
34            mainClass: 'mfp-fade',
35            closeOnContentClick: false,
36            delegate: '.img-gallery',
37            markup: '<div class="mfp-figure">'+
38            '<div class="mfp-close"></div>'+
39            '<div class="mfp-img"></div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button
40
41            callbacks: {
42                // markupParse is fired on every load/change
43                markupParse: function (template, values, item) {
44                    // This sets up the title to pull from the currItem
45                    //values.title = item.el.attr('title');
46
47                },
48                // open fires only on the initial load.
49                open: function () {
50                    if (this + '[href*="player.vimeo"]') {
51                        // For Vimeo Tracking
52                        /* jshint ignore:start */
53                        "undefined" != typeof bindVimeoGA && typeof bindVimeoGA == typeof Function && bindVimeoGA(this.currItem.el)
54                        /* jshint ignore:end */
55                    }
56                    
57                },
58                // change fires after the popup is loaded and the next/previous arrows are clicked
59                change: function() {
60                    
61                },
62
63            },
64            gallery:{
65                enabled:true,
66                navigateByImgClick: false,
67                arrowMarkup: '<button title="%title%" onclick="" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
68                tPrev: 'Previous (Left arrow key)',
69                tNext: 'Next (Right arrow key)'
70            },
71        });
72    });
73
74    // Show gallery images in popup
75    $('.img-pop').magnificPopup({
76        type: 'image',
77        removalDelay: 500,
78        mainClass: 'mfp-fade',
79        closeOnContentClick: false,
80        callbacks: {
81            // markupParse is fired on every load/change
82            markupParse: function(template, values, item) {
83                // This sets up the title to pull from the currItem
84                //values.title = item.el.attr('title');
85            },
86            // open fires only on the initial load.
87            open: function () {
88                
89            },
90// leaving this will reset the attached cta and only re-pop the cta if the specific item is clicked OR on any change in the gallery.
91            change: function() {
92                
93            },
94        },
95    });
96    // Show pages in iframe
97    $('.popup-page, a[href*="iframe=true"]').magnificPopup({
98        type: 'iframe',
99        removalDelay: 500,
100        mainClass: 'mfp-fade',
101        closeOnContentClick: false,
102        closeMarkup: '<button title="Close (Esc)" type="button" class="mfp-close tabbed-close">× Close Window</button>',
103        iframe: {
104            markup: '<div class="mfp-iframe-scaler tab-frame">' +
105            '<button title="Close (Esc)" type="button" class="mfp-close tabbed-close">× Close Window</button>' +
106            '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +
107            '</div>',
108            srcAction: 'iframe_src',
109        },
110        callbacks: {
111            open: function () {
112                $('iframe').iFrameResize([{}]);
113            }
114        }
115    });
116    // Show gallery images in popup
117    $('.gallery > .gallery-item > div > a').magnificPopup({
118        
119        type: 'image',
120        removalDelay: 500,
121        mainClass: 'mfp-fade',
122        closeOnContentClick: false,
123        callbacks: {
124            // markupParse is fired on every load/change
125            markupParse: function(template, values, item) {
126                // This sets up the title to pull from the currItem
127                //values.title = item.el.attr('title');
128            }
129        },
130    });
131    
132
133})(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.