I have one column that contains image icons. I'd like to sort them (perhaps by the "id" attribute), but I'm new to Javascript and don't understand what I'm seeing in the js files enough to customize it. Can anyone make a recommendation? Thanks!
I would try using css, perhaps a div to hide text. For example, You have an image, and some text underneath it, but that text is invisible. There may be a better way to do it but I'm a student and still learning too. You wouldn't consider making the text really really small, and perhaps transparent using css?
Anyone else?
I have never seen this done before. I also have a bad feeling that if you make one column sort by ID, it may result in all of the other columns sorting by ID.
Well, you can't say I didn't try. Best of luck to you. I will be watching this topic. I'd like to hear your input.
Okay...think I know what was happening.
The sorting function was reading the text string up until the first non-string (<img>) tag. So in the hidden class, I put a list of the subsequent icons like this:
I had to revert back to text-only (no icons)...I don't know what the function was sorting, but it wouldn't work on hidden elements. I'm happier with functionality- plus it's inspiration to learn Javascript better!
Bookmarks