Unable to install fnGetHiddenNodes API plugin
Unable to install fnGetHiddenNodes API plugin
PaoloValladolid
Posts: 35Questions: 0Answers: 0
I added this line to my JSPX file, as instructed here: http://datatables.net/plug-ins/api#fnGetHiddenNodes
I got an "Object doesn't support this property or method" error message upon load of the page.
Is fnGetHiddenNodes provided in another .js file? I searched jquery.dataTables.js and was unable to find fnGetHiddenNodes there
I got an "Object doesn't support this property or method" error message upon load of the page.
Is fnGetHiddenNodes provided in another .js file? I searched jquery.dataTables.js and was unable to find fnGetHiddenNodes there
This discussion has been closed.
Replies
Did you save the fnGetHiddenNodes plug-in into the file you are including? The easiest way is like this example: http://datatables.net/examples/plug-ins/plugin_api.html
Allan
So the solution would be to copy the following function into my copy of jquery.dataTables.js?
$.fn.dataTableExt.oApi.fnGetHiddenTrNodes = function ( oSettings )
{
/* Note the use of a DataTables 'private' function thought the 'oApi' object */
var anNodes = this.oApi._fnGetTrNodes( oSettings );
var anDisplay = $('tbody tr', oSettings.nTable);
/* Remove nodes which are being displayed */
for ( var i=0 ; i
[code]
/*
* Function: fnGetHiddenTrNodes
* Purpose: Get all of the hidden TR nodes (i.e. the ones which aren't on display)
* Returns: array:
* Inputs: object:oSettings - DataTables settings object
*/
$.fn.dataTableExt.oApi.fnGetHiddenTrNodes = function ( oSettings )
{
/* Note the use of a DataTables 'private' function thought the 'oApi' object */
var anNodes = this.oApi._fnGetTrNodes( oSettings );
var anDisplay = $('tbody tr', oSettings.nTable);
/* Remove nodes which are being displayed */
for ( var i=0 ; i