MediaWiki:Pagination.js

var pagination_options = { num_edge_entries: 3, num_display_entries: 100, callback: pageselectCallback, items_per_page:20 } function pageselectCallback(page_index, jq){ var items_per_page = pagination_options.items_per_page; var offset = page_index * items_per_page; var new_content = $('#sonakofeed div.entry').slice(offset, offset + items_per_page).clone; $('#Searchresult').empty.append(new_content); return false; } function initPagination { var num_entries = $('#sonakofeed div.entry').length; // Create pagination element $("#Pagination").pagination(num_entries, pagination_options); }