PageSourceSearch

https://mindsit.io/wp-content/themes/nimmo/assets/js/ct-loadmore-grid.js?ver=all

js mindsit.io collected 2026-10-02 01:04:02 UTC 5,298 bytes, 101 lines download raw bytes

1jQuery(document).ready(function ($) {
2    "use strict";
3    var pageNum = [],
4        total = [],
5        max = [],
6        perpage = [],
7        nextLink = [],
8        masonry = [],
9        newItems = [];
10    $('.ct-grid').each(function () {
11        var _this = $(this);
12        var html_id = _this.attr('id');
13        var _variable = window["ct_load_more_" + html_id];
14        if (typeof _variable !== 'undefined') {
15            pageNum[html_id] = parseInt(_variable.startPage) + 1;
16            total[html_id] = parseInt(_variable.total);
17            max[html_id] = parseInt(_variable.maxPages);
18            perpage[html_id] = parseInt(_variable.perpage);
19            nextLink[html_id] = _variable.nextLink;
20            masonry[html_id] = _variable.layout;
21
22            $('#' + html_id + ' .ct-load-more').click(function () {
23                var _this_click = $(this);
24                _this_click.find('i').attr('class', 'fa fa-refresh fa-spin');
25                setTimeout(function () {
26                    $.get(nextLink[html_id], function () {
27                    })
28                        .done(function (data) {
29                            if (masonry[html_id] === 'masonry') {
30                                var items = $(data).find('#' + html_id + ' .ct-grid-masonry > .grid-item');
31                                var time = 0.4;
32                                items.each(function () {
33                                    $(this).addClass('ct-animated');
34                                    $(this).find('.grid-item-inner').css('animation-duration', time + 's');
35                                    time = time + 0.15;
36                                });
37                                $(items).imagesLoaded(function(){
38                                    $('#' + html_id).children('.ct-grid-masonry').append(items);
39                                    $.fn.ct_grid_refresh();
40                                    $(document).find('.filter-item.active').trigger('click');
41                                });
42                            }
43                            pageNum[html_id]++;
44                            if (pageNum[html_id] <= max[html_id]) {
45                                if (nextLink[html_id].indexOf('/page/') > -1) {
46                                    nextLink[html_id] = nextLink[html_id].replace(/\/page\/[0-9]?/, '/page/' + pageNum[html_id]);
47                                }
48                                else {
49                                    nextLink[html_id] = nextLink[html_id].replace(/paged=[0-9]?/, 'paged=' + pageNum[html_id]);
50                                }
51                            } else {
52                                _this_click.remove();
53                            }
54                        })
55                        .always(function () {
56                            _this_click.find('i').attr('class', 'fa fa-plus');
57                        });
58                }, 100);
59            });
60        }
61
62        var _pagination_variable = $('#' + html_id).find('.ct-grid-pagination');
63        if(typeof _pagination_variable !== 'undefined' || _pagination_variable.length > 0){
64            $('#' + html_id + ' .ct-grid-pagination').on('click','.page-numbers',function (e) {
65                e.preventDefault();
66                var _this_page = $(this);
67                if(_this_page.hasClass('current')){
68                    return;
69                }
70                var _p_link = _this_page.attr('href');
71                setTimeout(function () {
72                    $.get(_p_link, function () {
73                    })
74                        .done(function (data) {
75                            if (masonry[html_id] === 'masonry') {
76                                var _contents = $(data).find('#' + html_id + ' .ct-grid-inner');
77                                var _pagination = $(data).find('#' + html_id + ' .ct-grid-pagination');
78                                var items = $(data).find('#' + html_id + ' .ct-grid-masonry > .grid-item');
79                                var time = 0.4;
80                                items.each(function () {
81                                    $(this).addClass('ct-animated');
82                                    $(this).find('.grid-item-inner').css('animation-duration', time + 's');
83                                    time = time + 0.15;
84                                });
85                                $(items).imagesLoaded(function(){
86                                    $('#' + html_id).children('.ct-grid-masonry').html(_contents.html());
87                                    $('#' + html_id).find('.ct-grid-pagination').html(_pagination.html());
88                                    document.getElementById(html_id).scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
89                                    $.fn.ct_grid_refresh();
90                                    $(document).find('.filter-item.active').trigger('click');
91                                    $('#' + html_id).find('.grid-item-inner').addClass('wpb_start_animation animated');
92                                })
93                            }
94                        })
95                        .always(function () {
96                        });
97                }, 100);
98            });
99        }
100    });
101});

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.