mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-27 00:54:15 +01:00
New: New API method '$' which will perform a jQuery selector action on the TR elements from the table's TBODY, regardless of paging. For example: oTable.$('#allan').css('background-color', 'red') will find the element (TR, TD or anything else) which has an ID of 'allan' and perform the css action on it. This is potentially a much nicer interface than needing to use fnGetNodes. Still more to be done, such as options to take column visibility, ordering and filtering into account, but this might be the tipping point for calling it 1.9 :-)
This commit is contained in:
parent
58f85fc601
commit
42567c9968
14
media/js/jquery.dataTables.js
vendored
14
media/js/jquery.dataTables.js
vendored
@ -2281,6 +2281,20 @@
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Function: $
|
||||
* Purpose: Do a jQuery selector action on the table's TR elements (from the tbody) and
|
||||
* return the resulting expression
|
||||
* Returns: jQuery object
|
||||
* Inputs: string:sSelector - jQuery selector
|
||||
*/
|
||||
this.$ = function ( sSelector )
|
||||
{
|
||||
var oSettings = _fnSettingsFromNode(this[_oExt.iApiIndex]);
|
||||
return $(this.oApi._fnGetTrNodes(oSettings)).filter(sSelector);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Plugin API functions
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user