1
0
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:
Allan Jardine 2011-09-20 19:37:17 +01:00
parent 437ac29048
commit efa3209654

View File

@ -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() {