PageSourceSearch

https://www.npower.org/wp-content/plugins/wp-event-aggregator/assets/js/wpea-ajax-pagi.js?ver=1.9.3

js npower.org collected 2026-10-02 02:13:16 UTC 1,615 bytes, 43 lines download raw bytes

1jQuery(document).ready(function($){
2    $(document).on('click', '.prev-next-posts a', function(e){
3        var $link = $(this);
4        var $container = $link.closest('.wpea_frontend_archive'); // old container
5        var atts = $container.data('shortcode');       // shortcode attributes
6        var nextPage = parseInt($link.data('page')) || 1;
7
8        if (!atts || atts.ajaxpagi !== 'yes') return true;
9
10        e.preventDefault();
11        $container.addClass('wpea-loading');
12
13        $.ajax({
14            url: wpea_ajax.ajaxurl,
15            type: 'POST',
16            dataType: 'json',
17            data: {
18                action: 'wpea_load_paged_events',
19                atts: JSON.stringify(atts),
20                page: nextPage
21            },
22            success: function(response){
23                if(response.success){
24                    // Replace old container with new HTML
25                    $container.replaceWith(response.data);
26
27                    // Update $container reference for next click
28                    var $newContainer = $('.wpea_frontend_archive').filter(function(){
29                        return $(this).data('shortcode').ajaxpagi === 'yes';
30                    }).first();
31
32                    // Update pagination links dynamically
33                    $newContainer.find('.wpea-next-page').attr('data-page', nextPage + 1);
34                    $newContainer.find('.wpea-prev-page').attr('data-page', nextPage - 1);
35                }
36            },
37            complete: function(){
38                $container.removeClass('wpea-loading');
39            }
40        });
41
42    });
43});

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.