I'm not an HTML expert at all. I programmed the microcontroller and started going off on tangents.
I created an html document to display a table of microcontroller registers, register addresses, and register descriptions. I created a table with 3 columns and about 120 rows. Some register addresses are bit addressable - if their address ends with 0 or 8.
I want to highlight these "special" register addresses - by showing them in red. So, in the table cells where the register address ends with 0 or 8, I use "" and "" to surround the address value.
My table has 3 columns: register, address, and description. Then a line might look like
"ACC 0xE0 Accumulator".
I got the table all done and it looks great. Then it occurred to me that I wanted to be able to sort the table on any column. For example, if I click "Address" I want the table to redisplay and be sorted by the values in that column.
I searched and found a way. How it works is that there is a "Sort" button - click that and it will redisplay the sorting of the first column values. I implemented a simple version of it and got it working. I then changed it to sort the second column when the "Sort" button is clicked.
This doesn't exactly work...because of all those ""s anyway.
Example I copied from him:
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_sort_table
Is there something "simple" I can do to use this method - but still have some entries in the "Address" column appear red?
I should probably stick to programming microcontrollers, but I like a challenge.
Sample code to sort selected columns,
This isfree...
Ascending and descending sorting examples: