can't change css class of all pages

can't change css class of all pages

qindjqindj Posts: 2Questions: 0Answers: 0
edited August 2009 in General
Hi, everyone:

I'm newbie to databases, thank you for the great project.

I have one question of how to change the css class of all the pages

I have a users datagrid using DataTables , its uses javascript to get users status every 1 minitue

and according to the status data from server, I try to change the css class to gradeA or grandX if the user is online or not

but only the users of the current page changed, other pages not

it means that , if i change to the other page, i have to wait for 1 minute to know if the user is online or not...

is there a way to change all users of different pages one time?

btw: i get all users when the page loaded and using jquery.getjson to get the status of all users

then change the status one by one....

did i miss something?

sorry for my poor english, thank you!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    HI qindj,

    You need to use the fnGetNodes() function to get all TR elements in the table, rather than just querying the DOM directly. See http://datatables.net/api#fnGetNodes .

    Regards,
    Allan
  • qindjqindj Posts: 2Questions: 0Answers: 0
    thank you allan, i'll try later
This discussion has been closed.