superRaytin / paginationjs

A jQuery plugin to provide simple yet fully customisable pagination.
http://pagination.js.org
MIT License
912 stars 659 forks source link

paginationData is undefined #11

Closed devrow closed 8 years ago

devrow commented 8 years ago

jquery-1.12.3 paginationjs-2.0.7

$('#paginator').pagination({
    dataSource: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    pageSize: 2,
    autoHidePrevious: true,
    autoHideNext: true,
    callback: function(data, pagination) { }
});

TypeError: paginationData is undefined js/pagination-2.0.7/pagination.js Line 656

superRaytin commented 8 years ago

Here is a demo which using the code you gave above, and it works well:

http://codepen.io/superRaytin/pen/RRoZBz?editors=0010

I need more info.

jmediatechnology commented 2 years ago

I had the same problem. It was caused because

<div id="pagination-container"></div>

was not existing on the webpage. I had the div in a template file, and that template was not properly included.