From e296e9b3de98a0a760a732a9010ed89008a32819 Mon Sep 17 00:00:00 2001 From: Andrew Maxwell Date: Fri, 9 Nov 2012 19:15:43 -0800 Subject: [PATCH] Added callback to destroy Added a callback function to the destroy method for simple chaining. --- jquery.isotope.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jquery.isotope.js b/jquery.isotope.js index f4efad6..0efe95a 100644 --- a/jquery.isotope.js +++ b/jquery.isotope.js @@ -836,7 +836,7 @@ }, // destroys widget, returns elements and container back (close) to original style - destroy : function() { + destroy : function( callback ) { var usingTransforms = this.usingTransforms; var options = this.options; @@ -867,7 +867,10 @@ .removeData('isotope'); $window.unbind('.isotope'); - + + if ( callback ) { + callback(); + } },