In the standard course of programming for my job and school, I have occasionally come to the need of a simple function or plugin to numerically sort UL list items. In the spirit of sharing with the community, here is a jQuery plugin that I wrote to accomplish this. It’s quite simple — just does what it does.

<script> //Implementation $("#list").sortUL(); </script> 1 2 3 4 <script> //Implementation $ ( "#list" ) . sortUL ( ) ; </script>