Skip to content

Instantly share code, notes, and snippets.

@suruseas
Created February 12, 2014 16:13
Show Gist options
  • Save suruseas/8958670 to your computer and use it in GitHub Desktop.
Save suruseas/8958670 to your computer and use it in GitHub Desktop.
テーブル(id=#table)の行をソートするよ。その二。
$('#table tr').sort(function(a, b){return ( Number( $('input:first-child', $('td:eq(1)', a) ).val()) - Number( $('input:first-child', $('td:eq(1)', b) ).val() ) );}).each(function(){$('#table').append($(this));});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment