I’m working on a livescores application using tables rows to display the records. The sorting is done by tr class name which has a value created by dateTime+countryId+leagueId+matchId, so the class becomes something like 1349565600312117160466446000000000000000 (i’m adding some zeros at the end to make all numbers having the same length).
The problem (with or without the zeros) is that the number is too big to be used for sorting with javascript so i was wondeing if there’s a way to achieve what i want.
As all the numbers are of the same length, Use the techniques of sorting strings.It will convert this number into characters and sort them according to ASCII value.
Insert as much value as you need into string array and the
strings.sort()will sort them !