<ul>
(1)<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
(2)<li>Quisque venenatis risus non justo malesuada, at varius nulla lacinia.</li>
(3)<li>Phasellus quis lacus ut ex rutrum sollicitudin ac quis nulla.</li>
</ul>
And i want sort to:
<ul>
(3)<li>Phasellus quis lacus ut ex rutrum sollicitudin ac quis nulla.</li>
(2)<li>Quisque venenatis risus non justo malesuada, at varius nulla lacinia.</li>
(1)<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
</ul>
Where are you getting the ul from? If you’re controlling it, it’s easiest to just output the list in the correct version initially? Otherwise, it’s going to be some cludgy scripting because they aren’t in alphabetical (or reverse alphabetical in this case) order, so there needs to be some sort of identifiable method of choosing how to sort them.
Thank you for your interest.
My case is that they give me a file containing the text. they asked me tick list with <ul> and <li>. The next requirement is to sort the list.
You’re going to get more out of it if you try. If you can’t resolve it, then by all means, repost and people here will be happy to help you. But you need to make an effort.