I have this table:
<table id="tbl">
<tr></tr>
<tr data-pts="3" data-goals="3" data-points="3" data-newgoals="1" data-newpoints="3"></tr>
<tr data-pts="2" data-goals="3" data-points="3" data-newgoals="1" data-newpoints="1"></tr>
<tr data-pts="5" data-goals="3" data-points="3" data-newgoals="1" data-newpoints="3"></tr>
<tr data-pts="4" data-goals="3" data-points="3" data-newgoals="1" data-newpoints="2"></tr>
</table>
I want to sort the table rows by two data attributes: (points+newpoints) DESC, and then (goals+newgoals) DESC (so if there are two table-rows with the same points+newpoints, it will decide who is first by goals+newgoals).
I can't find how to sort it by two attributes.