数据表实现中的分页问题
我在分页方面遇到了一个小问题。实现“four_button”类型时,表格会正确显示(具有正确的分页按钮),但是单击任何分页按钮(“下一个”、“上一个”等...)将引发“fnCallbackDraw 不是函数”的错误。在 Firebug 中进一步检查,我发现 fnCallbackDraw 是一个 div (div.dataTables_paginate)。查看代码,我没有看到这个值被分配在哪里?!! 为了让事情变得更有趣,“full_numbers”的其他分页实现可以正常工作。
还有其他人遇到过这个问题吗?对此问题的任何帮助将不胜感激。
I am having a small issue with pagination. When implementing the "four_button" type, the table displays correctly (with correct pagination buttons) however clicking on any of the pagination buttons (Next, Previous, etc...) will throw an error of "fnCallbackDraw is not a function". Inspecting it further in Firebug, i see that fnCallbackDraw is a div (div.dataTables_paginate). Looking within the code, I do not see where this value is being assigned??!!
To make matters more interesting the other pagination implementation of "full_numbers" works correctly.
Has anyone else come across this issue? Any help in this matter will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就我使用的数据表插件而言,分页只有两个选项,即“full_numbers”和“two_button”。我认为即使在最新的插件中也不存在“four_button”类型,因为我一直在使用版本“1.8.2”。尝试使用“full_numbers”或“two_button”类型。
希望这有帮助!
As far as I have used the datatable plugin, there are only two options for pagination namely "full_numbers" and "two_button". I don't think "four_button" type exists even in the latest plugin as I have been using version "1.8.2". Try using either of "full_numbers" or "two_button" types.
Hope this Helps!!
没有 fnCallbackDraw。它是fnDrawCallback。如果没有看到你的 DT 初始化代码,我猜这只是一个语法错误。 ;-)
如果我错了,请发回您的初始化对象的副本,我们将看看是否还有其他情况发生。
There is no fnCallbackDraw. It is fnDrawCallback. Without seeing your DT initialization code, I'm guessing it's just a syntax error. ;-)
If I'm wrong, post back with a copy of your initialization object and we'll see if there's anything else going on there.