PageSourceSearch

https://www.kulturecity.org/wp-content/themes/kc/assets/js/filter-categories.js?ver=1.0-b-modified-1787848395

js kulturecity.org collected 2026-10-01 10:12:01 UTC 1,621 bytes, 50 lines download raw bytes

1jQuery(document).ready(function() {
2    let defaultCategory = 'peer-reviewed-journal';
3    
4    jQuery.ajax({
5        type: 'POST',
6        url: '/wp-admin/admin-ajax.php',
7        dataType: 'json',
8        data: {
9            action: 'filter_posts',
10            category: defaultCategory,
11        },
12        success: function(res) {
13            if (res.status === "success") {
14                jQuery('.posts-tiles').html(jQuery.parseHTML(res.content));
15            } else {
16                jQuery('.posts-tiles').html("<p class='text-white'>" + res.message + "</p>");
17            }
18        },
19        error: function(err) {
20            console.error("Erro na requisição AJAX:", err);
21        }
22    });
23});
24
25jQuery(document).on('click', '.category-item', function() {
26    jQuery('.category-item').removeClass('active');
27    jQuery(this).addClass('active');
28
29    let categorySlug = jQuery(this).data('slug');
30
31    jQuery.ajax({
32        type: 'POST',
33        url: '/wp-admin/admin-ajax.php',
34        dataType: 'json', // JSON para garantir que a resposta seja tratada corretamente
35        data: {
36            action: 'filter_posts',
37            category: categorySlug,
38        },
39        success: function(res) {
40            if (res.status === "success") {
41                jQuery('.posts-tiles').html(jQuery.parseHTML(res.content)); // 💡 Aqui está a correção!
42            } else {
43                jQuery('.posts-tiles').html("<p class='text-white'>" + res.message + "</p>");
44            }
45        },
46        error: function(err) {
47            console.error("Erro na requisição AJAX:", err);
48        }
49    });
50});

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.