Browse Source

Merge git://github.com/lfjallstrom/isotope

pull/150/head
Vedran Vrbanc 13 years ago
parent
commit
60c72e5d7c
  1. 3
      jquery.isotope.js

3
jquery.isotope.js

@ -796,15 +796,14 @@
// removes elements from Isotope widget // removes elements from Isotope widget
remove: function( $content, callback ) { remove: function( $content, callback ) {
// remove elements from Isotope instance in callback // remove elements from Isotope instance in callback
var instance = this;
var removeContent = function() { var removeContent = function() {
instance.$allAtoms = instance.$allAtoms.not( $content );
$content.remove(); $content.remove();
}; };
if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) { if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) {
// if any non-hidden content needs to be removed // if any non-hidden content needs to be removed
this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle }); this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle });
this.$allAtoms = this.$allAtoms.not( $content );
this.$filteredAtoms = this.$filteredAtoms.not( $content ); this.$filteredAtoms = this.$filteredAtoms.not( $content );
this._sort(); this._sort();
this.reLayout( removeContent, callback ); this.reLayout( removeContent, callback );

Loading…
Cancel
Save