From cec5684ca5e8e22eb99c5d1bc13a107d8f359d53 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Wed, 20 Aug 2014 21:40:36 -0400 Subject: [PATCH] add getFilteredItemElements, Ref #768 --- js/isotope.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/js/isotope.js b/js/isotope.js index 8da4cc2..9636070 100644 --- a/js/isotope.js +++ b/js/isotope.js @@ -579,6 +579,20 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode return returnValue; }; + // ----- helper methods ----- // + + /** + * getter method for getting filtered item elements + * @returns {Array} elems - collection of item elements + */ + Isotope.prototype.getFilteredItemElements = function() { + var elems = []; + for ( var i=0, len = this.filteredItems.length; i < len; i++ ) { + elems.push( this.filteredItems[i].element ); + } + return elems; + }; + // ----- ----- // return Isotope;