github url : https://github.com/Mottie/tablesorter
사용방법
[html]
<script type="text/javascript" src="jquery.tablesorter.min.js"></script>
<link rel="stylesheet" href="theme.blue.css" />
<table id="myTable>
<tr>
<th>No</th>
<th>Grade</th>
<th>Price</th>
</tr>
<tr>
<td>1</td>
<td>C</td>
<td>$0.50</td>
</tr>
<tr>
<td>2</td>
<td>B</td>
<td>$3.75</td>
</tr>
<tr>
<td>3</td>
<td>G</td>
<td>$1.5</td>
</tr>
<tr>
<td>4</td>
<td>F</td>
<td>$12.0</td>
</tr>
<tr>
<td>5</td>
<td>A</td>
<td>$10.5</td>
</tr>
</table>
<script>
$(function(){
$("#myTable").tablesorter({
theme : 'blue',
widgets : ['zebra', 'columns'],
usNumberFormat : false,
sortReset : true,
sortRestart : true,
headers: {
0: {
sorter : false
}
}
});
});
</script>
댓글 없음:
댓글 쓰기