1 2var items = $('.list-wrapper .list-item'); 3 4var perpage = 9; 5var numitems = (items.length)/(perpage); 6 7items.slice(perpage).hide(); 8 9$('#pagination-container').pagination({ 10 items : numitems, 11 itemsonpage : perpage, 12 prevtext : "<", 13 nexttext : ">", 14 onPageClick : function (pageNumber){ 15 var showFrom = perpage * (pageNumber-1); 16 var showTo = showFrom + perpage; 17 items.hide().slice(showFrom,showTo).show(); 18 } 19 20}); 21 22$(document).ready(function(){ 23 24 var pagination = $('#pagination-container'); 25 26 $('#search').keyup(function(){ 27 var text = $(this).val().toLowerCase(); 28 var perPage = 20; 29 var pageNumber = 1; 30 if (text.length == 0) { 31 perPage = 9; 32 pageNumber = 1; 33 } 34 $('.list-item').hide(); 35 $('#cut').css('visibility', 'visible'); 36 var matches = $('.list-item').filter(function () { 37 return $(this).text().toLowerCase().indexOf(text) != -1; 38 }); 39 40 matches.each(function (index) { 41 if (index < perPage) { 42 $(this).closest('.list-item').show(); 43 } 44 }); 45 46 if (text.trim() === '') { 47 pagination.show(); 48 } else { 49 pagination.hide(); 50 } 51 52 53 }); 54 55 56 $('#cut').click(function(){ 57 if($('#search').val('')) 58 { 59 window.location.replace(""); 60 } 61 62 }); 63});
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.