Created
May 3, 2015 10:52
-
-
Save andyf-7/3433867f94c6aae61871 to your computer and use it in GitHub Desktop.
Table all tr ascending wise sorting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('table tr').sort(function(a, b){ | |
return $('td:eq(0)', a).text() > $('td:eq(0)', b).text() | |
}).appendTo('tbody'); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment