I have a function where i pass the variable of a table. Because ihave multiple tables on my Site.
tabellePlan = $('#tabelle1).DataTable( {..})
tabelleKosten = $('#tabelle2').DataTable( {..})
tabellePlan.on( 'select', function () {
updateUeberblick(tabellePlan)
} );
function updateUeberblick(selectedTabelle){
var selectedId;
var selected = selectedTabelle.row( { selected: true } );
if ( selected.any() ) { selectedId = selected.data().id;
//get selectedTablles id <-----
switch(id) {
case x:
// code block
}
or is there a better way to solve this?