排序<a> inside list item alphabatically

时间:2018-06-16 17:06:19

标签: jquery

So i have a list:

<ul>
 <li><a>Belgium</a></li>
 <li><a>Florida</a></li>
 <li><a>Alaska</a></li>
</ul>

I want it to sort alphabatically so that it looks like:

  • Alaska
  • Belgium
  • Florida

Please help with jquery only, i have seen some codes that allows this without the tag, but i need this way, Thanks in advance.

Please see that there is tag inside the list, so there is no duplicate

0 个答案:

没有答案