Tabs and tables page to page
Tabs and tables page to page
Hello every one,
I really like the functions datatables give me but i could not find a solution to this.
On the home page there is a little place with tabs(different catagories), within the tabs you can enter a filter value like "i like cheese". (in this small spot there is no place for a big table that is why i switch pages)
So in this place i click on tab 2 enter "i like cheese" and press search.
Then i go to a new page with same tabs and the datatables with results.
I should then see the tab i selected active with "i like cheese" in the filter and the results below in the datatables.
I cant seem to get my head around it.
Greets, Kees
I really like the functions datatables give me but i could not find a solution to this.
On the home page there is a little place with tabs(different catagories), within the tabs you can enter a filter value like "i like cheese". (in this small spot there is no place for a big table that is why i switch pages)
So in this place i click on tab 2 enter "i like cheese" and press search.
Then i go to a new page with same tabs and the datatables with results.
I should then see the tab i selected active with "i like cheese" in the filter and the results below in the datatables.
I cant seem to get my head around it.
Greets, Kees
This discussion has been closed.
Replies
[code]
$(document).ready(function() {
$("#tabs").tabs( { event: 'click', cookie:{ expires: 1 },
"show": function(event, ui) {
var oTable = $('div.dataTables_scrollBody>table.display', ui.panel).dataTable();
if ( oTable.length > 0 ) {
oTable.fnAdjustColumnSizing();
}
}
} );
$('table.display').dataTable( {
"sDom": '<"top"fli>p<"wrapper"rt><"bottom"ip><"clear">',
"sPaginationType": "full_numbers",
"bPaginate": true,
"bJQueryUI": true,
"bStateSave": true,
"aoColumnDefs": [
{ "aTargets": [ -1 ] }
]
} );
} );
[/code]
Allan