1jQuery(function($) { 2 $('body').on('click', '.ttb-load-more', function(e) { 3 e.preventDefault(); 4 var button = $(this), 5 data = { 6 'action': 'loadmore', 7 'query': ttb_load_more_params.posts, 8 'page': ttb_load_more_params.current_page 9 }; 10 11 $.ajax({ 12 url: ttb_load_more_params.ajaxurl, 13 data: data, 14 type: 'POST', 15 beforeSend: function(xhr) { 16 button.text('Loading...'); 17 }, 18 success: function(data) { 19 if(data) { 20 button.text('Load More Posts'); 21 $('.ttb-posts-grid').append(data); // Append new posts to the grid 22 ttb_load_more_params.current_page++; 23 24 // Hide the button if the current page is the last page 25 if (parseInt(ttb_load_more_params.current_page) >= parseInt(button.data('max-page'))) { 26 button.hide(); 27 } 28 } else { 29 button.remove(); 30 } 31 } 32 }); 33 }); 34});
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.