I am working with node.js,jade,socket.io and jquery. I successfully created chat application and displaying online users with green colored dot and offline users with a red color dot in table. color depends on condition so I used Jquery to apply color. Now,I need to display all the online users on the top.My idea is to sort the rows by its color so that green colored will display on top.I am working with node.js,jade,socket.io and jq