Change text color after edit a cell
Change text color after edit a cell
I am using jeditable plugin to edit a text in a cell.
I tried the next code in the callback function:
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
aData = oTable.fnGetData(aPos[0]);
aData.addClass('blueded');
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
}
but it is not working
How can acomplish this task to change the text color to identify an edited cell.
Thanks in advance for your support.
I tried the next code in the callback function:
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
aData = oTable.fnGetData(aPos[0]);
aData.addClass('blueded');
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
}
but it is not working
How can acomplish this task to change the text color to identify an edited cell.
Thanks in advance for your support.
This discussion has been closed.
Replies
[code]
var aPos = oTable.fnGetPosition( self );
var aData = oTable.fnSettings().aoData[ aPos[0] ]._aData;
aData.addClass('blueded');
[/code]
with no result
Discussion ID 1000! I feel like there should be a prize or something... How about an answer to your question :-) :
It looks like you are trying to add a class so an Array - and using a function (addClass) which doesn't exist for an array (it's a jQuery function).
Try something like this:
[code]
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
aData = oTable.fnGetData(aPos[0]);
aData.addClass('blueded');
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
$(this).addClass('blueded');
}
[/code]
Regards,
Allan