Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just encountered this error so I thought I'd post a response in case anyone else has trouble with it later.</p> <p>Although the above answer doesn't mention it, I was able to replicate the error by first instantiating tablesorter() and then triggering a sort request. </p> <p>This order of events would be necessary when appending or replacing existing table data with new data via AJAX or otherwise like so:</p> <pre><code>// populate our table body with rows $("#myTable tbody").html(json.tbody); // let the sorting plugin know that we made a update $("#myTable").trigger("update"); // set sorting column and direction, this will sort on the first and third column var sorting = [[2,1],[0,0]]; // sort $("#myTable").trigger("sorton",[sorting]); </code></pre> <p>The combination of the "update" and the "sorton" event seems to be triggering the error. By the time the "sorton" event is handled the DOM hasn't been assigned the table.config.parsers - thus the error.</p> <p>The fix is to wrap the "sorton" event handling in a 1 millisecond timeout.</p> <p>Replace the existing "sorton" bind in jquery.tablesorter.js (line ~803) with the following:</p> <pre><code>}).bind("sorton", function (e, list) { var me = this; setTimeout(function () { $(this).trigger("sortStart"); config.sortList = list; // update and store the sortlist var sortList = config.sortList; // update header count index updateHeaderSortCount(me, sortList); // set css for headers setHeadersCss(me, $headers, sortList, sortCSS); // sort the table and append it to the dom appendToTable(me, multisort(me, sortList, cache)); }, 1); </code></pre> <p><a href="http://tablesorter.com">tablesorter()</a> is really a handy plugin. Thanks to Christian for releasing it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload