From 821264d30e0fcc2e65a5052ea5db4272c5fe4e66 Mon Sep 17 00:00:00 2001 From: Toosick Date: Mon, 17 Nov 2014 10:20:30 -0600 Subject: [PATCH] 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 7bac91186a..aa8f9d24c6 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');