PageSourceSearch

https://foodary.org/wp-content/themes/sampression-lite/lib/js/isotope.js?ver=6.4.2

js foodary.org collected 2026-10-06 17:51:41 UTC 2,577 bytes, 74 lines download raw bytes

1jQuery(document).ready(function ($) {
2    // init Isotope
3    var $container = $('#post-listing'),
4        colWidth = function () {
5            var w = $container.width(),
6                columnNum = 4,
7                columnWidth = 0;
8            if (w <= 800) {
9                columnNum = 2;
10            }
11            if (w <= 400) {
12                columnNum = 1;
13            }
14
15            columnWidth = Math.floor(w / columnNum) - 15;
16            $container.find('.item').each(function () {
17                var $item = $(this),
18                    multiplier_w = $item.attr('class').match(/item-w(\d)/),
19                    multiplier_h = $item.attr('class').match(/item-h(\d)/),
20                    width = multiplier_w ? columnWidth * multiplier_w[1] - 4 : columnWidth - 4,
21                    height = multiplier_h ? columnWidth * multiplier_h[1] * 0.5 - 4 : columnWidth * 0.5 - 4;
22                $item.css({
23                    width: width
24                    //height: height
25                });
26            });
27
28            return columnWidth;
29        },
30        isotope = function () {
31            $container.isotope({
32                itemSelector: '.item',
33                masonry: {
34                    columnWidth: colWidth(),
35                    gutter: 20
36                }
37            });
38        };
39    isotope();
40    $(document).on('change', '#get-cats', function () {
41        //debugger;
42        var selector = jQuery(this).val();
43        $container.isotope({filter: selector});
44        pageScroll('#primary-nav-scroll', 700);
45    });
46    $(window).on('debouncedresize', isotope);
47    $('#filter a').on('click', function () {
48        var select = $(this).data('filter');
49        if (select === '*') {
50            $('#filter a').removeClass('selected');
51            if (!$(this).hasClass('selected')) {
52                $(this).addClass('selected');
53            }
54        } else {
55            $('#filter').find("[data-filter='*']").removeClass('selected');
56            $(this).toggleClass('selected', '');
57        }
58        var selector = Array();
59        $('#filter a').each(function () {
60            if ($(this).hasClass('selected')) {
61                selector.push($(this).data('filter'));
62            }
63        });
64        selector = selector.join(', ');
65        if (selector == '') {
66            $('#filter').find("[data-filter='*']").addClass('selected');
67            selector = '*';
68        }
69
70        $container.isotope({
71            filter: selector
72        });
73    });
74});

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.