Merge pull request #31 from Billiam/bugfix/clickable-ellipses

Foundation pagination: Do not navigate to unparseable page numbers.
pull/32/head
Allan Jardine 11 years ago
commit 4faa61e40b

@ -127,8 +127,11 @@ $.extend( $.fn.dataTableExt.oPagination, {
.insertBefore( $('li:last', host) )
.bind('click', function (e) {
e.preventDefault();
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
fnDraw( oSettings );
var pageNum = parseInt($('a', this).text(),10);
if ( ! isNaN(pageNum)) {
oSettings._iDisplayStart = (pageNum-1) * oPaging.iLength;
fnDraw( oSettings );
}
} );
} );

Loading…
Cancel
Save