From 0d9a29ac36fa53be6a6a7492bfa12dda3ec10dd9 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Tue, 3 Sep 2013 23:26:52 -0400 Subject: [PATCH] add number > 50 filter to example --- examples/filter-sort.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/filter-sort.html b/examples/filter-sort.html index 5655108..004a6e4 100644 --- a/examples/filter-sort.html +++ b/examples/filter-sort.html @@ -20,6 +20,7 @@ +

Sort

@@ -189,6 +190,12 @@ docReady( function() { // var opt = {}; var key = event.target.parentNode.getAttribute('data-isotope-key'); var value = event.target.getAttribute('data-isotope-value'); + + if ( key === 'filter' && value === 'number-greater-than-50' ) { + value = function( elem ) { + return parseInt( elem.querySelector('.number').textContent, 10 ) > 40; + }; + } console.log( key, value ); iso.options[ key ] = value; iso.layout();