diff --git a/dist/isotope.pkgd.js b/dist/isotope.pkgd.js index f409085..399217f 100644 --- a/dist/isotope.pkgd.js +++ b/dist/isotope.pkgd.js @@ -3177,6 +3177,7 @@ var trim = String.prototype.trim ? var matches = []; var hiddenMatched = []; var visibleUnmatched = []; + var results; var test = this._getFilterTest( filter ); @@ -3201,12 +3202,17 @@ var trim = String.prototype.trim ? } } - // return collections of items to be manipulated - return { + results = { matches: matches, needReveal: hiddenMatched, needHide: visibleUnmatched }; + + // allow the filtered items to be modified + this.dispatchEvent( 'itemsFiltered', null, [ results ] ); + + // return collections of items to be manipulated + return results; }; // get a jQuery, function, or a matchesSelector test given the filter @@ -3558,4 +3564,3 @@ var trim = String.prototype.trim ? return Isotope; })); - diff --git a/js/isotope.js b/js/isotope.js index 90f23f3..0947cff 100644 --- a/js/isotope.js +++ b/js/isotope.js @@ -238,6 +238,7 @@ var trim = String.prototype.trim ? var matches = []; var hiddenMatched = []; var visibleUnmatched = []; + var results; var test = this._getFilterTest( filter ); @@ -262,12 +263,17 @@ var trim = String.prototype.trim ? } } - // return collections of items to be manipulated - return { + results = { matches: matches, needReveal: hiddenMatched, needHide: visibleUnmatched }; + + // allow the filtered items to be modified + this.dispatchEvent( 'itemsFiltered', null, [ results ] ); + + // return collections of items to be manipulated + return results; }; // get a jQuery, function, or a matchesSelector test given the filter