jQuery(function($){ var items = $("table tr"); var numItems = items.length; var perPage = 2; items.slice(perPage).hide(); $(".pagination-page").pagination({ items: numItems, itemsOnPage: perPage, cssStyle: "light-theme", onPageClick: function(pageNumber) { var showFrom = perPage * (pageNumber - 1);var showTo = showFrom + perPage; items.hide(); .slice(showFrom, showTo).show();}});
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
You have a number of syntax errors in your example. Assuming that your html table is populated correctly on the server-side, this seems to work fine: