If I have ul li with a number inside the li, how can I order all the ul by this number (the Higher should be first)?
For example I have that html that I can't change
<ul id="ul-list">
<li>
<div class="name">product 1</div>
<div class="rating">85</div>
</li>
<li>
<div class="name">product 2</div>
<div class="rating">20</div>
</li>
<li>
<div class="name">product 3</div>
<div class="rating">95</div>
</li>
</ul>
I want re-order that list so product 3 will be the first one because that item has the highest rating, and product 2 will be the last one because that product has the lowest rating