次のように、検索ボタンをクリックすると動的に生成されるテーブルがあります。
puts "<table class=\"resultsTable\">"
puts "<tr><th colspan=\"10\" class=\"head\">Search Results</th></tr>"
puts "<tr>"
puts "<th></th>"
puts "<th>App</th>"
puts "<th>Name</th>"
puts "<th>Region</th>"
puts "<th>Market</th>"
puts "<th>Language</th>"
puts "<th>Function</th>"
puts "<th>LOB</th>"
puts "<th>Term</th>"
puts "<th>Call</th>"
puts "</tr>"
puts "<tr>"
puts "<td id=\"$cellID\">"
puts "<img src=\"images/magnifier.gif\" style=\"cursor:pointer\" onclick=\"showRouting({'spec':'${specific}', 'id':'${mkt_id}', 'name':'${mkt_name}', 'xfer':'${xfertype}', 'cell':'${cellID}'})\"</img>"
puts "</td>"
puts "<td>$level</td>"
puts "<td>$name</td>"
puts "<td>$reg_name</td>"
puts "<td>$link</td>"
puts "<td>$lang</td>"
puts "<td>$func</td>"
puts "<td>$lob</td>"
puts "<td>$term</td>"
puts "<td>$call</td>"
puts "</tr>"
各列 (アプリ、名前など) で並べ替えることができるように、何らかの種類の並べ替えを有効にすることはできますか? ある種のjqueryテーブルソーターなどを見てきましたが、私のコードではそれを行うことができません. 誰かが私がこれを行う方法を教えてもらえますか?
[0,0][1,0] とはどういう意味ですか? それに応じてコードを変更するにはどうすればよいですか?:
$(document).ready(function()
{
$("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} );
}
);