PageSourceSearch

https://newyorkseo.io/wp-content/themes/flatsome-child/assets/js/custom.js?ver=1791580875

js newyorkseo.io collected 2026-10-09 21:21:31 UTC 4,320 bytes, 114 lines download raw bytes

1(function ($) {
2    $('.row.k-top-nha-cai-item .col:last-child i, .k-nha-cai-uy-tin.widget i').each(function() {
3        if ($(this).hasClass('icon-star-o')) {
4            $(this).removeClass('icon-star-o').addClass('fa-regular fa-futbol').css('font-size', '1.3em');
5        }
6        if ($(this).hasClass('icon-clock')) {
7            $(this).removeClass('icon-clock').addClass('fa-regular fa-eye').css('font-size', '1.3em');
8        }
9    });
10    
11    // Change the .k-btn-on-hover block position
12    $(".k-btn-on-hover").each(function() {
13        var btnOnHoverEl = $(this);
14        btnOnHoverEl.appendTo(btnOnHoverEl.parent().find(".box-image"));
15    });
16    
17    $(".tab-panels .box-image").hover(function() {
18    	$(this).find('.k-btn-on-hover').css('display', 'flex');
19    }, function() {
20	    $(this).find('.k-btn-on-hover').hide();
21    });
22    
23    (function() {
24    	var hidden_block_view = function(element, your_height = 150){
25                var wrap = element;
26                var current_height = wrap.height();
27                if(current_height > your_height){
28                    wrap.css('height', your_height+'px');
29                    wrap.append(function(){
30                        return '<div class="devvn_readmore_flatsome"><span title="Xem thêm" href="javascript:void(0);">Xem thêm</span></div>';
31                    });
32                    $('body').on('click','.devvn_readmore_flatsome', function(){
33                        wrap.removeAttr('style');
34                        $('body .devvn_readmore_flatsome').remove();
35                    });
36                }
37            };
38
39            if ($('.k-readmore-box').length > 0) {
40                hidden_block_view($('.k-readmore-box'), 300);                     
41            }
42    })();
43
44    var KPagination = {
45        _parentEl: '',
46        _limit: 16,
47        _currentPage: 1,
48
49        init(parentEl, limit = 16, currentPage = 1) {
50            this._parentEl = parentEl;
51            this._limit = limit;
52            this._currentPage = currentPage;
53            this.doPagination(this._currentPage);
54        },
55        
56        clearPagination() {
57            this._parentEl.next('.k-pagination-wrapper').remove();
58        },
59        
60        doPagination(currentPage) {
61            let _this = this;
62            _this._currentPage = currentPage;
63            let totalItems = _this._parentEl.children().length;
64            let totalPages = Math.ceil(totalItems / _this._limit);
65    
66            if (totalPages < 2) return false;
67            
68            // hide elements that are not in the current page
69            let firstShownItem = (currentPage - 1) * _this._limit;
70            this._parentEl.children().each(function(index) {
71                if (index < firstShownItem || index >= firstShownItem + _this._limit) {
72                    $(this).hide();
73                } else {
74                    $(this).show();
75                }
76            });
77    
78            // generate HTML pagination
79            let uls = [];
80            uls.push('<div class="row k-pagination-wrapper"><div class="col"><div class="col-inner"><ul class="page-numbers nav-pagination links text-center">');
81            for (var i = 1; i <= totalPages; i++) {
82                if (currentPage == i) {
83                    uls.push(`<li><span aria-current="page" class="page-number current">${i}</span></li>`);
84                } else {
85                    uls.push(`<li><a class="page-number" href="#">${i}</a></li>`);
86                }
87            }
88            uls.push('</ul></div></div></div>');
89            let paginationStr = uls.join('');
90    
91            _this._parentEl.next('.k-pagination-wrapper').remove();
92            _this._parentEl.after(paginationStr);
93            $(document).off('click.pagination').on('click.pagination', '.nav-pagination li', function(e) {
94                e.preventDefault();
95                var currentPage = $(this).text();
96                _this.doPagination(currentPage);
97            });
98        },
99
100    }
101    $('#tab_tất-cả > .row').each(function() {
102        if ($(this).children().length < 16) return;
103
104        KPagination.init($(this), 24, 1);
105    });
106})(jQuery);
107
108
109// show/hide c-ads-center
110jQuery(document).ready(function($) {
111  $('.c-ads-center .button').on('click', function() {
112    $('.c-ads-center').hide();
113  });
114});

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.