PageSourceSearch

https://www.juvare.com/wp-content/themes/juvare-child/assets/js/resources-filter.js

js juvare.com collected 2026-10-01 10:24:10 UTC 1,970 bytes, 58 lines download raw bytes

1jQuery(function($) {
2    let selectedIndustry = '';
3
4    function load_resources(page = 1, append = false) {
5        let search = $('#resources-search').val();
6        let types = [];
7        $('.resources-listing > .ajax-loader').show();
8        $('#resources-types input:checked').each(function() {
9            types.push($(this).val());
10        });
11
12        $.post(resources_ajax.url, {
13            action: 'resources_filter',
14            page: page,
15            search: search,
16            industry: selectedIndustry,
17            types: types
18        }, function(response) {
19            $('.resources-listing > .ajax-loader').hide();
20
21            if (append) {
22                $('#resources-results').append(response.html);
23            } else {
24                $('#resources-results').html(response.html);
25            }
26
27            $('#resources-load-more').data('page', page);
28
29            if (page >= response.max_pages || response.max_pages === 0) {
30                $('#resources-load-more').hide();
31            } else {
32                $('#resources-load-more').show();
33            }
34        }, 'json');
35    }
36
37    $('#resources-search, #resources-types input').on('input change', function() {
38        load_resources(1, false);
39    });
40    
41    $('#resources-industries').on('click', 'li', function() {
42        $('#resources-industries li').removeClass('active');
43        $(this).addClass('active');
44        selectedIndustry = $(this).data('industry');
45        load_resources(1, false);
46        $('html, body').animate({
47            scrollTop: $('.resources-listing-wrapper').offset().top - 100
48        }, 500);
49    });
50
51    $('#resources-load-more').on('click', function() {
52        let page = $(this).data('page') + 1;
53        load_resources(page, true);
54        // $('html, body').animate({
55        //     scrollTop: $('.resources-listing-wrapper').offset().top - 100
56        // }, 500);
57    });
58});

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.