PageSourceSearch

https://meetrise.com/wp-content/themes/mouno/elements/assets/js/grid.js?ver=1.0.0

js meetrise.com collected 2026-10-02 15:09:44 UTC 7,976 bytes, 164 lines download raw bytes

1( function( $ ) {
2    "use strict";
3    
4    $( window ).on( 'elementor/frontend/init', function() {
5        setTimeout(function(){
6            $('.pxl-grid').each(function(index, element) { 
7                var $grid_scope = $(this);
8                var $grid_masonry = $grid_scope.find('.pxl-grid-masonry');
9                const masonryLayout = $grid_scope.attr('data-masonry-layout');
10                var isoOptions = {
11                    layoutMode : masonryLayout,
12                    percentPosition: true,
13                    itemSelector: '.pxl-grid-item',
14                    masonry: {
15                        columnWidth: '.grid-sizer',
16                    },
17                };
18
19                var $grid_isotope = $grid_masonry.isotope(isoOptions);
20                 
21                // Filter
22                $(document).on('click', '.pxl-grid-filter .filter-item, .pxl-filter-widget .filter-item', function(e) {
23                    e.preventDefault()
24                    let filterItemCurrent = $(this);
25                    let term_slug = filterItemCurrent.attr('data-filter');  
26                    let filterWrap = filterItemCurrent.parent('.pxl-grid-filter');
27                    $('.pxl-filter-widget .filter-item').removeClass('active');        
28                    $(this).addClass('active');
29                    if( $(filterWrap).hasClass('ajax') ){
30                        let loadmore = $grid_scope.data('loadmore');
31                        loadmore.term_slug = term_slug;
32                        mouno_grid_ajax_handler( filterItemCurrent, $grid_scope, $grid_isotope, 
33                            { action: 'mouno_load_more_post_grid', loadmore: loadmore, iso_options: isoOptions, handler_click: 'filter', scrolltop: 0 }
34                        );
35                    }else{
36                        $grid_isotope.isotope({ filter: term_slug });
37                    }
38                });
39
40                // Pagination
41                $grid_scope.on('click', '.pxl-grid-pagination .ajax a.page-numbers', function(e) {
42                    e.preventDefault();
43                    e.stopPropagation();
44                    var $this = $(this);
45                    var loadmore = $grid_scope.data('loadmore');
46                    var paged = $this.attr('href');
47                    paged = paged.replace('#', '');
48                    loadmore.paged = parseInt(paged);
49                    mouno_grid_ajax_handler( $this, $grid_scope, $grid_isotope, 
50                        { action: 'mouno_load_more_post_grid', 
51                            loadmore: loadmore, 
52                            iso_options: isoOptions, 
53                            handler_click: 'pagination', 
54                            scrolltop: 0,
55                             wpnonce: main_data.wpnonce }
56                    );
57                });
58
59                // Load More
60                $grid_scope.on('click', '.pxl-load-more-button', function(e) {
61                    e.preventDefault();
62                    var $this = $(this);
63                    var loadmore = $grid_scope.data('loadmore');
64                    loadmore.paged = parseInt($grid_scope.data('start-page')) + 1; 
65                    mouno_grid_ajax_handler( $this, $grid_scope, $grid_isotope, 
66                        { action: 'mouno_load_more_post_grid', loadmore: loadmore, iso_options: isoOptions, handler_click: 'loadmore', scrolltop: 0, wpnonce: main_data.wpnonce }
67                    );
68                });
69            });
70        }, 300);
71
72        function mouno_grid_ajax_handler($this, $grid_scope, $grid_isotope, args = {}){
73            var settings = $.extend( true, {}, {
74                action: '',
75                loadmore: '',
76                iso_options: {},
77                handler_click: '',
78                scrollTop: 0,
79                wpnonce: ''
80            }, args );
81
82            var offset_top = $grid_scope.offset().top; 
83            let parent = $grid_scope.closest('.e-con.e-parent');
84            let loadMoreButton = $(parent).find('.pxl-load-more-button').first();
85            let isPortfolioLayout2 = $grid_scope.hasClass('pxl-layout-portfolio2') || false;
86
87            let isCheck = false;
88            $.ajax({
89                url: main_data.ajax_url,
90                type: 'POST',
91                data: {
92                    action: settings.action,
93                    settings: settings.loadmore,
94                    handler_click: settings.handler_click,
95                    wpnonce: settings.wpnonce
96                },
97                beforeSend: function() {  
98                    settings.scrollTop = $(window).scrollTop();
99                    if(isPortfolioLayout2 === true) {
100                        let gridItems = $grid_scope.find('.pxl-grid-item');
101                        isCheck = (gridItems.length / 2 !== 0) || false;
102                    }
103                    $grid_scope.find('.pxl-grid-loader').addClass('loading');
104                },
105                success: function( res ) {   
106                    if(res.status == false) return; 
107                    
108                    if( settings.handler_click == 'loadmore' ){
109                        $grid_scope.find('.pxl-grid-inner').append(res.data.html)
110                        if(res.data.paged >= res.data.max){
111                            $grid_scope.find('.pxl-load-more-wrapper').hide()
112                        }
113                    }else{
114                        $grid_scope.find('.pxl-grid-inner .pxl-grid-item').remove();
115                        $grid_scope.find('.pxl-grid-inner').append(res.data.html);
116                        $grid_scope.find(".pxl-grid-pagination").html(res.data.pagin_html);
117                    }
118
119                    if( settings.iso_options){
120                        $grid_isotope.isotope('destroy');
121                        $grid_isotope.isotope(settings.iso_options);
122                    }
123                    if( $grid_scope.find('.pxl-grid-filter').hasClass('pxl-animate') ){
124                        var $animate_el = $grid_scope.find('.pxl-grid-filter'),
125                            data = $animate_el.data('settings');  
126                        if(typeof data != 'undefined' && typeof data['animation'] != 'undefined'){
127                            setTimeout(function () {
128                                $animate_el.removeClass('pxl-invisible').addClass('animated ' + data['animation']);
129                            }, data['anim_delay']);
130                        }else{
131                            setTimeout(function () {
132                                $animate_el.removeClass('pxl-invisible').addClass('animated fadeInUp');
133                            }, 300);
134                        }
135                    } 
136                    $grid_scope.data('start-page', res.data.paged);
137                },
138                complete: function() {
139                    $(window).scrollTop(settings.scrollTop);
140                    $grid_scope.find('.pxl-grid-item').addClass('pxl-invisible');
141                    $grid_scope.find('.pxl-grid-loader').removeClass('loading');
142                    if(isPortfolioLayout2 === true) {
143                        $grid_scope.find('.pxl-grid-item').each(function (index, item) {
144                            if(isCheck === true) {
145                                if (index % 2 !== 0) {
146                                    $(item).addClass('reverse');
147                                } else {
148                                    $(item).removeClass('reverse'); 
149                                }
150                            }else {
151                                if (index % 2 === 0) {
152                                    $(item).addClass('reverse');
153                                } else {
154                                    $(item).removeClass('reverse'); 
155                                }
156                            }
157                        });
158                    }
159                }
160            });
161        }
162    });
163     
164} )( 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.