Created
February 15, 2011 17:35
-
-
Save loginx/827864 to your computer and use it in GitHub Desktop.
Extends Isotope, providing a reset() method to empty the grid and reLayout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds a .isotope( 'flush' ) method to your Isotope widget. | |
// This method will remove all items from the widget and from the DOM, | |
// then trigger a reLayout. | |
$.Isotope.prototype.flush = function() { | |
this.$allAtoms = $(); | |
this.$filteredAtoms = $(); | |
this.element.children().remove(); | |
this.reLayout(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment