如何在jQuery Datatables分页中返回特定页面? [英] How to return the specific page in jQuery Datatables paging?
本文介绍了如何在jQuery Datatables分页中返回特定页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每行中都有一个datable和编辑"按钮.当我单击该按钮时,/edit/url打开.到现在为止一切都还好.但是,如果我需要返回数据表,则从第一页开始.我该怎么办?
I have a datable and "Edit" button in each row. When I click that button, /edit/ url opens. Everything is Ok until now. But if I need to go back to the datatable, it starts from the first page. What can I do for that?
$('#table').dataTable({
"sDom" : 'rtFip>',
'fnDrawCallback' : function() {
$('input:checkbox, input:radio').checkbox();
},
'sPaginationType' : 'full_numbers',
"bServerSide" : true,
"sAjaxSource" : "{% url 'get_menu_list' %}"
});
推荐答案
DataTables可以选择将状态存储在cookie中.
DataTables has option to store state in a cookie.
$(document).ready(function() {
$('#example').dataTable( {
"stateSave": true
} );
} );
http://datatables.net/examples/basic_init/state_save.html
这篇关于如何在jQuery Datatables分页中返回特定页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文