How to modify background of an hidden td
How to modify background of an hidden td
I have a table with 20 cols and 300 rows.
I can apply filter and I use pagination.
I also have a button to apply changes to cells from not filtered rows : change value and background image.
To change value i use
[code]
otab_clt.fnUpdate(champs['CCOLD_TOURNEE_NOUVELLE01']['new'],$(otab_clt.fnGetNodes()).filter(temp)[0],colNewTournee,true,true);
[/code]
To modify backgroung image, I do :
[code]
$('#td_clt_CCOLD_TOURNEE_NOUVELLE01_'+cdclt).css("background-image", "url("+icon+")" );
[/code]
but this last code doesn't modify image of pages which aren't display.
Is there an api to do that (like fnUpdate) ?
I can apply filter and I use pagination.
I also have a button to apply changes to cells from not filtered rows : change value and background image.
To change value i use
[code]
otab_clt.fnUpdate(champs['CCOLD_TOURNEE_NOUVELLE01']['new'],$(otab_clt.fnGetNodes()).filter(temp)[0],colNewTournee,true,true);
[/code]
To modify backgroung image, I do :
[code]
$('#td_clt_CCOLD_TOURNEE_NOUVELLE01_'+cdclt).css("background-image", "url("+icon+")" );
[/code]
but this last code doesn't modify image of pages which aren't display.
Is there an api to do that (like fnUpdate) ?
This discussion has been closed.
Replies
We have to acces to the datable object :
[code]
$(otab_clt.fnGetNodes()).each(function ()
{
var id = $(this).attr('id');
if ($(this).attr('id') == 'tr_clt_'+cdclt)
{
$(this).children().eq(colNewTournee).css("background-image", "url("+icon+")" );
return(false);
}
});
[/code]