I have a list as below that is created dynamically:
<ul>
<li>20</li>
<li>10</li>
<li>5</li>
<li>3</li>
<li>32</li>
<li>25</li>
<li>6</li>
<li>12</li>
<li>8</li>
</ul>
Is it possible order this list using jQuery? I need it ordered from lower to bigger, like this:
<ul>
<li>3</li>
<li>5</li>
<li>6</li>
<li>8</li>
<li>10</li>
<li>12</li>
<li>20</li>
<li>25</li>
<li>32</li>
</ul>
Using sortContent plugin ,everything will be easy,clean and ready for reuse :
Known that :
DEMO
If you want to discover other options , visit Plugin HOMEPAGE
There are jQuery plugins to handle this as well. Check out TinySort
Below should do the trick:
You can do:
Here is a possible way to do it: