Core: add config.table variable

This commit is contained in:
Mottie 2014-07-15 11:48:43 -05:00
parent ed5a86ffad
commit e0ecda6423
2 changed files with 13 additions and 0 deletions

View File

@ -4951,6 +4951,18 @@ $('.tablesorter')[0].config.cache[0].normalized[0];
<td></td>
</tr>
<tr id="variable-table-element">
<td><a href="#" class="permalink">config.table</a></td>
<td>DOM element</td>
<td>Internally stored DOM table element (<span class="version">v2.17.5</span>)
<div class="collapsible">
<br>
The <code>table.config.table</code> variable is useful when certain callback functions only pass the config object; originally you could use <code>config.$table[0]</code>, but this saves that small extra trouble.
</div>
</td>
<td></td>
</tr>
<tr id="variable-table">
<td><a href="#" class="permalink">config.$table</a></td>
<td>jQuery Object</td>

View File

@ -1016,6 +1016,7 @@
if (!/tablesorter\-/.test($table.attr('class'))) {
k = (c.theme !== '' ? ' tablesorter-' + c.theme : '');
}
c.table = table;
c.$table = $table
.addClass(ts.css.table + ' ' + c.tableClass + k)
.attr({ role : 'grid'});