Pager Problem changing Div style inside a TR

Pager Problem changing Div style inside a TR

pbxManpbxMan Posts: 2Questions: 2Answers: 0
edited June 2013 in General
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

Replies

  • pbxManpbxMan Posts: 2Questions: 2Answers: 0
    edited June 2013
    Solved.

    [code]
    auxButton = $('#Id1');
    [/code]
This discussion has been closed.