problem in leigeber's sorting

Posted by developer on Stack Overflow See other posts from Stack Overflow or by developer
Published on 2010-04-28T11:50:55Z Indexed on 2010/04/28 11:53 UTC
Read the original article Hit count: 401

Filed under:
|
|
|
|

iam using leigeber's sorting javascript to sort my data on my page......i took the js from here :- leigeber's sorting javascript

Now this is shwoing highlighted sorted column and all and its all perfect.Now iam having some negative and some positive values in my data and i want to show those negative data in red color and positive in green.This whole sorting thing is using js and css to do the highlighting and sorting.Iam a bit confused now and cant make it out that how i can assign red color to the negative ones and green to the positive ones as js is returning the data as an object i.e. a complete row and i cant make 1 column's data red or green.Will it be done by js itself or with the help of stylesheet to find -ves and +ves.Im totally lost and dont know how to do it.Please help!!!!

this is an example of hte data iam using this whole sorting thing on:-

-Name-  -Price- -loss-  -Pts-
abc     361.15  -5.68   -21.75
abc2   1072.35  -5.24   -59.25
abc3    512.35   5.24    28.35
abc4    335.2   -5.02   -17.7
abc5    318.6    5.01   -16.8
abc6    76.15   -4.15    3.3

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript