mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Fix example: Need element scope to calculate TD index! - 6647
This commit is contained in:
parent
437ac29048
commit
efa3209654
@ -18,7 +18,7 @@
|
||||
} );
|
||||
|
||||
$('td', oTable.fnGetNodes()).hover( function() {
|
||||
var iCol = $('td').index(this) % 5;
|
||||
var iCol = $('td', this.parentNode).index(this) % 5;
|
||||
var nTrs = oTable.fnGetNodes();
|
||||
$('td:nth-child('+(iCol+1)+')', nTrs).addClass( 'highlighted' );
|
||||
}, function() {
|
||||
@ -474,7 +474,7 @@
|
||||
} );
|
||||
|
||||
$('td', oTable.fnGetNodes()).hover( function() {
|
||||
var iCol = $('td').index(this) % 5;
|
||||
var iCol = $('td', this.parentNode).index(this) % 5;
|
||||
var nTrs = oTable.fnGetNodes();
|
||||
$('td:nth-child('+(iCol+1)+')', nTrs).addClass( 'highlighted' );
|
||||
}, function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user