开发者

Why do I get this error with tinysort on table?

When I try to use JQuery's tinySort I get this error

Error: this.setArray is not a functionSource
File: http://tinysort.sjeiti.com/scripts/jquery.tinysort.jsLine: 109

Here is a JSFiddle

http://jsfiddle.net/littlesandra88/wJzNE/

and here is how my table looks like.

Any idea what's wrong?

If it is a difficult problem, does there then exist easier way to sort the columns with a button?

<table class="alerts" cellspacing="0">
  <tbody>

开发者_StackOverflow中文版    <tr class="header">
      <th class="activity-header"><a href="javascript:sortTable(1)">CWIS</a></th>
      <th class="activity-header">First Name</th>
      <th class="activity-header">Signed</th>
      <th class="activity-header"></th>
    </tr>

    <form action="" method="post">
      <input name="anchor" value="2548" type="hidden">
      <tr>
    <td class="activity-data">2648</td>
    <td class="activity-data">RVV</td>
    <td class="checkbox"> <input name="signed" type="checkbox" checked </td>
    <td class="edit-column"><a href="javascript:showhide('2648');">Details</a> <input value="Save" type="submit"></td>
      </tr>

      <tr id="2548" class="edit-row" style="display: none;">
    <td class="edit-column"> </td>
      </tr>
    </form>

    <form action="" method="post">
      <input name="anchor" value="8249" type="hidden">
      <tr>
    <td class="activity-data">7249</td>
    <td class="activity-data">B</td>
    <td class="checkbox"> <input name="signed" type="checkbox" checked </td>
    <td class="edit-column"><a href="javascript:showhide('8249');">Details</a> <input value="Save" type="submit"></td>
      </tr>

      <tr id="7249" class="edit-row" style="display: none;">
    <td class="edit-column"> </td>
      </tr>
    </form>

  </tbody>

</table>


I think its an issue with the script versions.

Either use jQuery 1.4.1 or use the latest version of the tineysort (which got rid of setArray and uses pushStack).

I tried it @ jsfiddle and got rid of the error either way.

Check http://jsfiddle.net/wJzNE/1/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜