Tabs with tables
Tabs with tables
I have 4 Bootstrap tabs with one table each.
the data on each table is fetched server side.
My issue is whenever the page with the tabs load, the 4 tables call their respective urls all at the same time.
is there any way to simply let the "active" table be the only one who can query for its contents?
the data on each table is fetched server side.
My issue is whenever the page with the tabs load, the 4 tables call their respective urls all at the same time.
is there any way to simply let the "active" table be the only one who can query for its contents?
This discussion has been closed.
Replies
This is what I did when I implemented parent/child tables in tabs
What i want to do is that when the page loads, only the table/s present on the active tab execute an ajax to populate its table.
[code]
if( $('#tab1').hasClass('active')) {
// $.ajax()
}
[/code]
Then when the other tab(s) are selected, listen to the change event
[code]
$('#tab2').live('click'), function(e){
$.ajax();
});
[/code]