gbirke/jquery_pagination — Issue #19: Only shows 1 entry
Author: julianfuerderer
Created: 2011-11-09 18:47:51+00:00
State: open

Hi,

i am new in using jquery_pagination, and have a problem.
I used the example code from the download-package...
Here is my pagination-javascript:

function pageselectCallback(page_index, jq)
{
var new_content = jQuery('#hiddenresult div.item:eq('+page_index+')').clone();
$('#Searchresult').empty().append(new_content);
return false;
}

function initPagination()
{
// count entries inside the hidden content
var num_entries = jQuery('#hiddenresult div.item').length;
// Create content inside pagination element
$("#test").pagination(num_entries, {
items_per_page:2,
callback: pageselectCallback,
num_display_entries: 9,
load_first_page: true,
next_show_always: false
});
}

$(document).ready(function()
{
initPagination();
});

My Problem:
Between the

tag I put 4

, and by alerting "num_entries", it gives me the corrent numer 4.

But there i only 1 item per page...and i set items_per_page:2....

What is the problem ?

Please help me....