1jQuery(document).ready(function($){ 2 if($('.tabs__list-item').length > 1){ 3 $('.tabs__list-item').show(); 4 } else { 5 $('.tabs__list').parent().css({'position':'relative'}).prepend('<span class="hr-line"></span>'); 6 $('.hr-line').css({ 7 'background-color': '#000', 8 'display': 'block', 9 'height': '.1875rem', 10 'width': '100%' 11 }); 12 } 13 $('#load-more-tab').on('click', function(e){ 14 e.preventDefault(); 15 var button = $(this); 16 var page = parseInt(button.attr('data-page')); 17 let termId = button.attr('data-term'); 18 let taxonomy = button.attr('data-taxonomy'); 19 20 $.ajax({ 21 url: HBG_Ajax.url, 22 type: 'GET', 23 data: { 24 action: 'hbg_tab_panel_data', 25 termId: termId, 26 taxonomy: taxonomy, 27 page: page + 1 28 }, 29 beforeSend: function(){ 30 button.text('Loading...'); 31 }, 32 success: function(res){ 33 if(res.success && res.data.results.length){ 34 res.data.results.forEach(function(item){ 35 $('#tab-genre-items').append( 36 '<div class="carousel__item">'+ 37 '<a href="'+item.link+'">'+ 38 '<figure class="carousel__book-cover">'+item.image+ 39 '<figcaption class="screen-reader-text">'+item.title+'</figcaption>'+ 40 '</figure>'+ 41 '</a>'+ 42 '</div>' 43 ); 44 }); 45 if(res.data.results.length == 25){ 46 button.attr('data-page', page + 1).text('Load More'); 47 } else { 48 button.remove(); 49 } 50 } else { 51 button.remove(); 52 } 53 } 54 }); 55 return false; 56 }); 57});
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.