Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

sorting rollable tables by name

1523280857

Edited 1523289688
is this possible? it appears that the td for that row is higlightable, but can someone just throw in the few lines of code to Sort the list? from w3: <script> function sortList() { var list, i, switching, b, shouldSwitch; list = document.getElementById("id01"); switching = true; /* Make a loop that will continue until no switching has been done: */ while (switching) { // Start by saying: no switching is done: switching = false; b = list.getElementsByTagName("LI"); // Loop through all list items: for (i = 0; i < (b.length - 1); i++) { // Start by saying there should be no switching: shouldSwitch = false; /* Check if the next item should switch place with the current item: */ if (b[i].innerHTML.toLowerCase() > b[i + 1].innerHTML.toLowerCase()) { /* If next item is alphabetically lower than current item, mark as a switch and break the loop: */ shouldSwitch= true; break; } } if (shouldSwitch) { /* If a switch has been marked, make the switch and mark the switch as done: */ b[i].parentNode.insertBefore(b[i + 1], b[i]); switching = true; } } } </script>
1523310113
Gen Kitty
Forum Champion
For your suggestions, we offer the Suggestions & Ideas forum, which is based on voting from the whole community. Please review our Forum Voting wiki page for more information on how voting works, and our Posting to Suggestions & Ideas section of the Code of Conduct . As this is a suggestion thread outside the designated forum, this thread will be closed.