function change_pagination(sort,id,npages,nrows_perpage,max_rows) { /* before displaying a new page get the pagination right we create a new div and use jquery's "replaceWith" to put the new div in place. The arguments: sort: sort order for the rows, needed as argument for show_page id: id of page which was clicked npages: number of pages to present at once (with only one page visible, the rest hidden) nrows_perpage: number of rows per page max_rows: total number of rows in the database */ var replace = ''; $("#pagination").replaceWith(replace); }