mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Update highlight example to use $ API method
This commit is contained in:
parent
9ebabaf089
commit
4bfe3d7c89
@ -17,12 +17,11 @@
|
||||
"bSortClasses": false
|
||||
} );
|
||||
|
||||
$('td', oTable.fnGetNodes()).hover( function() {
|
||||
oTable.$('td').hover( function() {
|
||||
var iCol = $('td', this.parentNode).index(this) % 5;
|
||||
var nTrs = oTable.fnGetNodes();
|
||||
$('td:nth-child('+(iCol+1)+')', nTrs).addClass( 'highlighted' );
|
||||
$('td:nth-child('+(iCol+1)+')', oTable.$('tr')).addClass( 'highlighted' );
|
||||
}, function() {
|
||||
$('td.highlighted', oTable.fnGetNodes()).removeClass('highlighted');
|
||||
oTable.$('td.highlighted').removeClass('highlighted');
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
@ -473,12 +472,11 @@
|
||||
"bSortClasses": false
|
||||
} );
|
||||
|
||||
$('td', oTable.fnGetNodes()).hover( function() {
|
||||
oTable.$('td').hover( function() {
|
||||
var iCol = $('td', this.parentNode).index(this) % 5;
|
||||
var nTrs = oTable.fnGetNodes();
|
||||
$('td:nth-child('+(iCol+1)+')', nTrs).addClass( 'highlighted' );
|
||||
$('td:nth-child('+(iCol+1)+')', oTable.$('tr')).addClass( 'highlighted' );
|
||||
}, function() {
|
||||
$('td.highlighted', oTable.fnGetNodes()).removeClass('highlighted');
|
||||
oTable.$('td.highlighted').removeClass('highlighted');
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
|
Loading…
x
Reference in New Issue
Block a user