From fad75366088fe892a88d1b5cd5379bee08449464 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 7 Feb 2013 08:29:51 +0000 Subject: [PATCH] Fix: $().andSelf() was deprecated in jQuery 1.8 - As of jQuery 1.8 `andSelf` was deprecated in favour of `andBack`. `andBack` was not available in jQuery <1.8, and I don't want to make 1.8 a requirement yet, so a small workaround requiring two unbind calls is used to avoid calling `andSelf` or `andBack`. --- media/src/api/api.methods.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/src/api/api.methods.js b/media/src/api/api.methods.js index bd01cf8f..b60423b1 100644 --- a/media/src/api/api.methods.js +++ b/media/src/api/api.methods.js @@ -493,7 +493,7 @@ this.fnDestroy = function ( bRemove ) } /* Blitz all DT events */ - $(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT'); + $(oSettings.nTableWrapper).unbind('.DT').find('*').unbind('.DT'); /* If there is an 'empty' indicator row, remove it */ $('tbody>tr>td.'+oSettings.oClasses.sRowEmpty, oSettings.nTable).parent().remove();