My html is this:
<div class="comment_div">
<span class="upvotes">4</span>
</div>
<div class="comment_div">
<span class="upvotes">7</span>
</div>
<div class="comment_div">
<span class="upvotes">2</span>
</div>
The value of .upvotes
is dynamic so I want js/jquery to sort the divs based on the value at that time. How would I do this?