From 4bfe3d7c89adb148342c73eea2e97411d7bba3a1 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 14 Dec 2011 17:51:06 +0000 Subject: [PATCH] Update highlight example to use $ API method --- examples/api/highlight.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/api/highlight.html b/examples/api/highlight.html index ff312d96..d087b4df 100644 --- a/examples/api/highlight.html +++ b/examples/api/highlight.html @@ -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'); } ); } ); @@ -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'); } ); } );