jQuery 数据表 Twitter/facebook 风格分页
我一直在寻找关于如何做到这一点的好资源,但没有运气。我使用 jQuery 数据表插件进行服务器端处理并启用管道传输(示例) 。我在我的 asp.net webforms 项目中使用了此功能,并将在未来的项目中转向 MVC。我正在使用找到的类进行服务器端处理 这里。我也一直在浏览这里找到的文章 与分页相关。
基本上我需要做的是使用数据表插件和服务器端处理创建这种类型的分页(管道在这里不一定重要)
注意: 通过 twitter/style 分页,我指的是:
- 表格底部的一个按钮,可带回附加到表格中现有内容的附加结果
- 当用户通过滚动到达当前结果的末尾时,附加结果会无限加载(注意:我发现此功能内置于数据表插件中,因此我需要关注之前的方法)。
最终我想在上面两种分页样式之间进行选择。
有人有什么好的建议和/或示例/教程可以分享吗?
I have been searching around for a good resource on how to do this with no luck. I am using the jQuery datatables plugin with serverside processing along with pipelining enabled(example). I have this working in my asp.net webforms project and will be moving to MVC for future projects. I am taking care of server side processing with the class found Here. I have also been looking through the article found Here related to the pagination.
Basically what I need to do is create this type of pagination with the datatables plugin and server side processing(pipelining is not necessarily important here)
NOTE:
By twitter/style paging I am referring either to:
- A single button at the bottom of the table that brings back additional results appended to the existing content in the table
- Additional results loading infinitely as the user reaches the end of the current results via scrolling(NOTE: I have discovered that this functionality is built into the datatables plugin so I need to focus on the previous method).
Ultimately I would like to have the choice between both styles of pagination above.
Doest anyone have any good advice and/or samples/tutorials to share?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我开发了 PageLoadMore 插件,允许用“加载更多”替换默认分页控件“ 按钮。
btn-example-load-more
的“加载更多”按钮。使用下面的代码初始化表格:
请参阅此示例了解代码和示范。
有关更多信息,请参阅 jQuery DataTables:“加载更多”按钮示例和细节。
I have developed PageLoadMore plug-in that allows to replace default pagination control with "Load more" button.
btn-example-load-more
after the table.Use the code below to initialize the table:
See this example for code and demonstration.
See jQuery DataTables: "Load more" button for more examples and details.