Using fnOpen with selector toggle - what am I doing wrong?

Using fnOpen with selector toggle - what am I doing wrong?

studiolelandstudioleland Posts: 22Questions: 1Answers: 0
edited March 2013 in DataTables 1.9
The following code works by clicking on the TR to extend another TR with any data. Great! But when I change the $('#example tbody tr').click() selector to something more specific in such as '#example tbody tr td.myclass a' the function fails. What am I missing. No doubt it has to do with the "this".

[code]
$(document).ready(function() {
var oTable;

// 'open' an information row when a row is clicked on
$('#example tbody tr').click( function () {
if ( oTable.fnIsOpen(this) ) {
oTable.fnClose( this );
} else {
oTable.fnOpen( this, "Temporary row opened", "info_row" );
}
} );

oTable = $('#example').dataTable();
} );
[/code]

Replies

  • studiolelandstudioleland Posts: 22Questions: 1Answers: 0
    Figured it out with this discussion here:

    http://datatables.net/forums/discussion/1201/jquery-parent-element-versus-parentnode/p1
This discussion has been closed.