Created
February 12, 2014 16:11
-
-
Save suruseas/8958630 to your computer and use it in GitHub Desktop.
テーブル(id=#table)の行をソートするよ。その一。
This file contains hidden or 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
$('#table tr').sort(function(a, b){return ( Number( $('td:eq(0)', a).text() ) - Number( $('td:eq(0)', b).text() ) );}).each(function(){$('#table').append($(this));}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment