How to prevent the page jumping to top when sorting
How to prevent the page jumping to top when sorting
jerry98225
Posts: 10Questions: 0Answers: 0
Hi guys, I just wanted to know how to prevent the page jumping to top whenever I click the text to sort the column. Thanks for the help.
Jerry
Jerry
This discussion has been closed.
Replies
oTable = jQuery('#example-flex').dataTable({
"bJQueryUI": true,
"bStateSave": false,
"sScrollx": "100%",
"sScrollXInner": "120%",
"aLengthMenu": [[10, 25, 50], ['10', '25', '50']],
"bAutoWidth": true,
"bProcessing": true,
"aoColumnDefs": [
{"sClass": "nosort", "aTargets": [0, 6, 7] },
{ "bVisible": true, "aTargets": [0, 1, 2, 3, 4, 5, 6, 7] },
{ "bSortable": false, "aTargets": [0, 6, 7] }
],
"sPaginationType": "input",
"sDom": 'R<"toolbar ui-widget-header">i<"tools"T><"cols"C><"secondary"fl<"pager"p>><"wrapper-scroll"rt><"clear"><"bottom"ilp>',
"oTableTools": {
"sSwfPath": "theme/media/swf/copy_cvs_xls_pdf.swf",
"aButtons": [
{
"sExtends": "collection",
"sButtonText": "Save As",
"aButtons": ["csv", "xls", "pdf"]
},
{
"sExtends": "collection",
"sButtonClass": "more",
"sButtonText": "More",
"aButtons": ["copy", "print"]
}
]
},
"oColVis": {
"aiExclude": [8],
"bRestore": true,
"bShowAll": true
}
});
jQuery("div.toolbar").html('Search Results');
jQuery('').insertAfter(".ColVis_Button.TableTools_Button.ui-button.ui-state-default.ColVis_MasterButton>span");
jQuery('').insertAfter('#ToolTables_example-flex_0>span');
jQuery('').insertAfter('#ToolTables_example-flex_4>span');
oTable.$('td').wrapInner('');
table is like this::
Type
Bill To
Ship To
Customer Name
Address
Phone #
DEA
Cart
249089
249089
Burke & Robinson M.D.P.C., Dr
1501 Miluli Ave, Bainbridge, GA 39819-5700
(229) 243-0152
249095
249095
Capital Health Plan
2140 Centerville Place Chp Ap Po Box 15349, Tallahassee, FL 32317
(850) 383-3567
249095
249096
Capital Health Plan
1491 Governors Square Blvd, Tallahassee, FL 32301-3049
XXX-XXX-XXXX
thanks,
Trish