1var sitePager = $(".blog-list-paging").paging(blogPostCount, { 2 3 // Set up onclick handler 4 onClick: function(ev) { 5 ev.preventDefault(); 6 7 var sitepage = $(this).data('page'); 8 9 if(type == "category") { 10 var url = '/modules/blog/ajax/category-list-items.php'; 11 } else if(type == "tag") { 12 var url = '/modules/blog/ajax/tag-list-items.php'; 13 } else if(type == 'archive') { 14 var url = '/modules/blog/ajax/archive-list-items.php'; 15 } else { 16 var url = '/modules/blog/ajax/blog-list-items.php'; 17 } 18 19 $.post(url, { current_page: sitepage, results_per_page: myPageCount, URL:URI, slug:slug }, function(data) { 20 info = data.split('~~~~~~'); 21 $("#blog-post-content").html(info[0]); 22 // added to scroll to top after page change 23 $('html, body').animate({ 24 scrollTop: $('.maincontent').offset().top 25 }, 500); 26 }); 27 sitePager.setPage(sitepage); 28 setTimeout(function(){ 29 $('img.js-cover').each( function() { 30 var $imagePath = $(this).attr('src'); 31 var $imageClasses = $(this).attr('class'); 32 $(this).replaceWith('<div class="' + $imageClasses + '" style="background-image:url(' + $imagePath + ');background-size:cover;"></div>'); 33 }); 34 }, 500); 35 }, 36 37 // Set up easy format 38 format: "<nncnn>", 39 40 // Typical onFormat handler, copied from source file 41 onFormat: function(type) { 42 43 switch (type) { 44 45 case 'block': 46 47 if (!this.active) 48 return '<span class="disabled page">' + this.value + '</span>'; 49 else if (this.value != this.page) 50 return '<em><a class="page" href="#">' + this.value + '</a></em>'; 51 return '<span class="current page">' + this.value + '</span>'; 52 53 case 'right': 54 case 'left': 55 56 if (!this.active) { 57 return ""; 58 } 59 return '<a class="page" href="#">' + this.value + '</a>'; 60 61 case 'next': 62 63 if (this.active) { 64 return '<a href="#" class="next">Next »</a>'; 65 } 66 return '<span class="page disabled">Next »</span>'; 67 68 case 'prev': 69 70 if (this.active) { 71 return '<a href="#" class="prev">« Prev</a>'; 72 } 73 return '<span class="disabled page">« Prev</span>'; 74 75 case 'first': 76 77 if (this.active) { 78 return '<a href="#" class="first">|<</a>'; 79 } 80 return '<span class="disabled page">|<</span>'; 81 82 case 'last': 83 84 if (this.active) { 85 return '<a href="#" class="prev">>|</a>'; 86 } 87 return '<span class="disabled page">>|</span>'; 88 89 case 'fill': 90 if (this.active) { 91 return "..."; 92 } 93 } 94 return ""; // return nothing for missing branches 95 } 96});
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.