名前が似たようなのばかりで区別つかねぇ。。。
table sort をためしてみる。
table sort
http://www.tagarga.com/blok/post/2
から
tablesort.js
を取得する。
up.gifとdown.gifは適当にサイトからでも直アドで取得できる。
あとは以下の定義をする。
前に試したソートのjavascriptと異なるのは
thではなく、ヘッダ部分をtdで書くということ。
サンプルはtdで書いてあるしtdみたいよ。
<script src="tablesort.js"></script>
/* indicates that the column can be sorted */ td.sortable { background:#606060; font-weight: bold; cursor: pointer; } /* indicates that the column is sorted from low to high */ td.sorted_asc { background:#606060 url(up.gif) center right no-repeat; } /* indicates that the column is sorted from high to low */ td.sorted_desc { background:#606060 url(down.gif) center right no-repeat; }