tablesorter寻呼机 [英] tablesorter pager
问题描述
我正在使用tablesorter,但我无法找到有关插件tablesorter寻呼机的任何文档。问题是我有一个显示一些数据的表,并且在每一行中都有一个删除链接,该链接附加了它将被删除的元素的唯一标识符(显然)。我的问题是,是否可以保存我正在删除的页面,然后将寻呼机直接设置为之前的页面?这是因为当我在删除行后重新加载表时,它会返回到第一页。
I'm working with tablesorter and I've not been able to find any documentation about the plugin tablesorter pager. The thing is that I have a table that displays some data and in each row there is a delete link that has attached to it the unique identifier of the element that it's going to be deleted (obviously). My question is, is it possible to save the page in which I'm at the moment of deleting, and then set the pager straight to the page it was before? It is because when I reload the table after deleting the row, it goes back to the first page.
我想做的是这样的事情:
What I want to do is something like this:
//Before deleting
var page = //Here is what I'm asking for, a way to get the page that is on now
var rowsPerPage = //A way to obtain the size option of the pager
//Delete row
//Refresh table and then a way to set the
///page where I was again.
$("#TST").tablesorter(...)
.tablesorterPager({
container: $("#TSTPager"),
positionFixed: false,
size: 5
});
非常感谢,
Victor
Thank you very much, Victor
推荐答案
如果您点击tablesorter标签,您会发现其他几个开发人员正在解决此类问题,例如需要帮助Jquery TableSorter寻呼机插件。
If you click on the tablesorter tag, you will find several other developers wrestling with this type of problem, such as Need Help with Jquery TableSorter Pager plugin.
在答案中,并回答其他类似的问题,建议使用 DataTables.net 。
In an answer there, and replies to other similar questions, a suggestion is made to use DataTables.net instead.
是的,考虑到此时更改工具令人沮丧,但是对您的分页问题感到沮丧,以及对其他工具的好评,建议您也许能够更快地解决这个问题,并通过更换工具让您的项目重回正轨。
Yes, it's frustrating to think of changing tools at this point, but the level of frustration with your paging problem, and the favorable opinions about the other tool, suggest that you might be able to get this problem solved more quickly, and get your project back on track, by changing tools.
这篇关于tablesorter寻呼机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!