PageSourceSearch

https://mikmag.ru/wa-data/public/shop/themes/tools/lazyloading.js?v2.3.0.1791159433

js mikmag.ru collected 2026-10-05 00:17:28 UTC 2,289 bytes, 66 lines download raw bytes

1$(function() {
2    
3    var paging = $('.lazyloading-paging');
4    if (!paging.length) {
5        return;
6    }
7    // check need to initialize lazy-loading
8    var current = paging.find('li.selected');
9    if (current.children('a').text() != '1') {
10        return;
11    }
12    paging.hide();
13    var win = $(window);
14    
15    // prevent previous launched lazy-loading
16    win.lazyLoad('stop');
17    
18    // check need to initialize lazy-loading
19    var next = current.next();
20    if (next.length) {
21        win.lazyLoad({
22            container: '#container #content',
23            load: function() {
24                win.lazyLoad('sleep');
25
26                var paging = $('.lazyloading-paging').hide();
27                
28                // determine actual current and next item for getting actual url
29                var current = paging.find('li.selected');
30                var next = current.next();
31                var url = next.find('a').attr('href');
32                if (!url) {
33                    win.lazyLoad('stop');
34                    return;
35                }
36
37                var product_list = $('#product-list .product-grid');
38                var loading = paging.parent().find('.loading').parent();
39                if (!loading.length) {
40                    loading = $('<div><i class="icon16 loading"></i>Loading...</div>').insertBefore(paging);
41                }
42
43                loading.show();
44                $.get(url, function(html) {
45                    var tmp = $('<div></div>').html(html);
46                    product_list.append(tmp.find('#product-list .product-grid').children());
47                    var tmp_paging = tmp.find('.lazyloading-paging').hide();
48                    paging.replaceWith(tmp_paging);
49                    paging = tmp_paging;
50                    
51                    // check need to stop lazy-loading
52                    var current = paging.find('li.selected');
53                    var next = current.next();
54                    if (next.length) {
55                        win.lazyLoad('wake');
56                    } else {
57                        win.lazyLoad('stop');
58                    }
59                    
60                    loading.hide();
61                    tmp.remove();
62                });
63            }
64        });
65    }
66});

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.