Functions on oTable that contains multiple tables

Functions on oTable that contains multiple tables

jrizzi1jrizzi1 Posts: 44Questions: 12Answers: 3
edited June 2013 in General
lets say i have two generic tables that share a class, when i call the datatables() on the class, and store it in a variable (oTable), it creates a noded object for the tables, oTable[0], oTable[1]...the reason i attempted this is i am using tabs, and each tab has a separate table

is it possible to then run functions on the noded table?

js
[code]
var oTable;
$(document).ready(function() {
oTable = $('.bufo').dataTable();
console.log(oTable);
$(document).on("click", ".delete", function(){
//this should be oTable[0] or relevant to the delete click
var aPos = oTable.fnGetPosition(this);

oTable.fnDeleteRow(oTable.fnGetPosition(aPos));

return false;
});
});
[/code]
html
[code]



type
call
action




amphibian
croak
delete







species
type
call
action




Bullfroicus
amphibian
budweiser
delete



[/code]
This discussion has been closed.