I am adding rows dynamically and using a great snippet from this site to make then editable. I have tried to use the same code to add a click handler to make them selectable but it does not work. How come it works for editable and not for selectable?
Here is the code:
Here is the code:
var aiData = oTable.fnAddData ( oRoom ); var oSettings = oTable.fnSettings(); // this bit works $('td', oSettings.aoData[ aiData[0] ].nTr).editable(function(value, settings) { var aPos = oTable.fnGetPosition( this ); console.log (aPos); return(value); }, { type : 'text', event : 'dblclick', } ); // the same selector with the click bind does not work - even with td replaced by tr $('td', oSettings.aoData[ aiData[0] ].nTr).click(function(value, settings) { // my func } );