Closed MrzAOK closed 4 years ago
You can sort by data attribute if you write your elements like this: <li data-sort="bat">YBat</li>
.
Or you could use a custom sort function.
What about if I don't have access to edit the markup? Currently I'm hiding the first letter with CSS, but I'd still like it to sort.
Your only option is a custom sort function then. But if you're going to do that for all your sorts you might as well ditch TinySort and just write it yourself. It's not that hard: https://codesandbox.io/s/simplevanillaasc-decsort-6jihj
Hi, is it possible to sort starting from the 2nd letter or character in a list? For example, I want to ignore the letters in bold below:
so the correct working order would be: