From 821264d30e0fcc2e65a5052ea5db4272c5fe4e66 Mon Sep 17 00:00:00 2001 From: Toosick Date: Mon, 17 Nov 2014 10:20:30 -0600 Subject: [PATCH 1/2] Fix gridster destroy Removes the coords data from each element. --- src/jquery.gridster.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 7bac9118..aa8f9d24 100755 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -3111,6 +3111,11 @@ fn.destroy = function(remove) { this.$el.removeData('gridster'); + // remove coords from elements + $.each(this.$el.find('li'),function(){ + $(this).removeData('coords'); + }); + // remove bound callback on window resize $(window).unbind('.gridster'); From 7dbd7a64f7ee91e67976dd4a421ac56e903beced Mon Sep 17 00:00:00 2001 From: Toosick Date: Mon, 17 Nov 2014 11:14:03 -0600 Subject: [PATCH 2/2] Update jquery.gridster.js --- src/jquery.gridster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index aa8f9d24..e8409847 100755 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -3112,7 +3112,7 @@ this.$el.removeData('gridster'); // remove coords from elements - $.each(this.$el.find('li'),function(){ + $.each(this.$widgets,function(){ $(this).removeData('coords'); });