fnGetPosition is not a function
fnGetPosition is not a function
Hello,
Here's what my code does:
[code]var dataTable = $([some-DOM-table]);
dataTable.fnGetPosition([some-DOM-tr-jQuery-object]);[/code]
I get error 'fnGetPosition is not a function'.
I have included 'jquery.dataTables.min.js' and 'jquery.dataTables.columnFilter.js'. I'm a still missing a file or what is wrong with my code?
Thank you
PS: I can provide a link to concrete code, this is for a private internal enterprise project.
Here's what my code does:
[code]var dataTable = $([some-DOM-table]);
dataTable.fnGetPosition([some-DOM-tr-jQuery-object]);[/code]
I get error 'fnGetPosition is not a function'.
I have included 'jquery.dataTables.min.js' and 'jquery.dataTables.columnFilter.js'. I'm a still missing a file or what is wrong with my code?
Thank you
PS: I can provide a link to concrete code, this is for a private internal enterprise project.
This discussion has been closed.
Replies
[code]var dataTable = $([some-DOM-table]).dataTable().columnFilter();
dataTable.fnGetPosition([some-DOM-tr-jQuery-object]);[/code]
I thought that maybe it makes more sense to store the result of .dataTable() in variable, though I'm not sure this is necessary, and I still get the same problem.
How I included jQuery/JavaScript:
[code]
[/code]
'0.js' is what some would have named 'main.js' and is where my code is executed.
By the way all of this works fine except the fnGetPosition() function.
columnFilter (which is 3rd party and not supported here btw) doesn't return a DataTables instance. You want:
[code]
var dataTable = $([some-DOM-table]).dataTable();
dataTable.columnFilter();
dataTable.fnGetPosition([some-DOM-tr-jQuery-object]);
[/code]
Allan
- some part of my code created an equivalent of $($(myDataTable).
- the row object needs to be a DOM object, not a jQuery object.
@allan: actually it works fine with columnFilter();