如何使用jquery分页插件

时间:2021-07-21 14:29:38

I've created a webpage to display the array elements, How to use the pagination plugin to display these contents 2 items per page, I've tried jquery.pajinate.js and some other plugins, but I've not figured out how to use it, Help me with any of the pagination plugins to solve this .. Any guidance and help is appreciated..!

我已经创建了一个显示数组元素的网页,如何使用分页插件每页显示这些内容2项,我试过jquery.pajinate.js和其他一些插件,但我还没弄明白怎么样使用它,帮助我任何分页插件来解决这个问题..任何指导和帮助表示赞赏..!

Here is the webpage that displays an array elements : http://jsfiddle.net/ztruc/

这是显示数组元素的网页:http://jsfiddle.net/ztruc/

1 个解决方案

#1


1  

please refer this fiddle

请参考这个小提琴

i have just added $('.message').hide().slice(0, 2).show(); //slice(startElement, endElement); for pagination. In this way you can implement pagination to your site.

我刚刚添加了$('。message')。hide()。slice(0,2).show(); // slice(startElement,endElement);分页。通过这种方式,您可以为您的网站实施分页。

#1


1  

please refer this fiddle

请参考这个小提琴

i have just added $('.message').hide().slice(0, 2).show(); //slice(startElement, endElement); for pagination. In this way you can implement pagination to your site.

我刚刚添加了$('。message')。hide()。slice(0,2).show(); // slice(startElement,endElement);分页。通过这种方式,您可以为您的网站实施分页。