jQuery Pagination Top And Bottom

March 10th, 2011

Thanks goes to VNSMANIAN2006 for the code for a quick top and bottom pagination element with jQuery Pagination. The original note can be found here: http://plugins.jquery.com/node/8360#comment-4157

And here is how I used it:
[code]
$(document).ready(function(){
$.get("ajax.php?getcount=1", {}, function(data){
$("#pagination").pagination(data, {
num_edge_entries: 2, num_display_entries: 6, items_per_page: 20,
next_show_always: false, prev_show_always: false,
callback: function(page_index, jp){
$.get("ajax.php?p="+page_index, {}, function(data){
$("#paginationb").empty();
$("#pagination").clone(true).prependTo("#paginationb");
$("#reportInfo").empty().append(data);
});
return false;
}
});
});
});[/code]

And all I did was add the #paginationb div below the table.

WordPress - Entries (RSS) and Comments (RSS) - © 2011 Ben Dauphinee