Pager Problem changing Div style inside a TR
Pager Problem changing Div style inside a TR
I'm new to DataTables. I have the following problem. I have a table with multiple rows, Those rows have a small Div whose brackground is an icon image. All of them have an unique ID. Sometimes I need to change this background.
I use:
[code]$('#id1').css("background-position","-20px 0px");[/code]
When I'm in the same page everything works fine but when I click on another page on the pager the element is just not there. I presume is generated dynamicaly because the ID is not in the DOM anymore.
I could I face this, should I listen to events sent by the pager, should I try the Jquery funtion "delegate". Does anybody know a better solution for this?
Thank you all
I use:
[code]$('#id1').css("background-position","-20px 0px");[/code]
When I'm in the same page everything works fine but when I click on another page on the pager the element is just not there. I presume is generated dynamicaly because the ID is not in the DOM anymore.
I could I face this, should I listen to events sent by the pager, should I try the Jquery funtion "delegate". Does anybody know a better solution for this?
Thank you all
This discussion has been closed.
Replies
[code]
auxButton = $('#Id1');
[/code]