|
|
|
@ -141,13 +141,9 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<script src="../bower_components/eventEmitter/EventEmitter.js"></script> |
|
|
|
|
<script src="../bower_components/eventie/eventie.js"></script> |
|
|
|
|
<script src="../bower_components/doc-ready/doc-ready.js"></script> |
|
|
|
|
<script src="../bower_components/get-style-property/get-style-property.js"></script> |
|
|
|
|
<script src="../bower_components/ev-emitter/ev-emitter.js"></script> |
|
|
|
|
<script src="../bower_components/get-size/get-size.js"></script> |
|
|
|
|
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> |
|
|
|
|
<script src="../bower_components/matches-selector/matches-selector.js"></script> |
|
|
|
|
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script> |
|
|
|
|
<script src="../bower_components/fizzy-ui-utils/utils.js"></script> |
|
|
|
|
<script src="../bower_components/outlayer/item.js"></script> |
|
|
|
|
<script src="../bower_components/outlayer/outlayer.js"></script> |
|
|
|
@ -161,9 +157,9 @@
|
|
|
|
|
<script src="../bower_components/isotope-cells-by-row/cells-by-row.js"></script> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
docReady( function() { |
|
|
|
|
var container = document.querySelector('#container'); |
|
|
|
|
var iso = window.iso = new Isotope( container, { |
|
|
|
|
|
|
|
|
|
var container = document.querySelector('#container'); |
|
|
|
|
var iso = window.iso = new Isotope( container, { |
|
|
|
|
layoutMode: 'fitRows', |
|
|
|
|
transitionDuration: '0.8s', |
|
|
|
|
cellsByRow: { |
|
|
|
@ -180,11 +176,11 @@ docReady( function() {
|
|
|
|
|
return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var options = document.querySelector('#options'); |
|
|
|
|
var options = document.querySelector('#options'); |
|
|
|
|
|
|
|
|
|
eventie.bind( options, 'click', function( event ) { |
|
|
|
|
options.addEventListener( 'click', function( event ) { |
|
|
|
|
if ( !matchesSelector( event.target, 'button' ) ) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -195,32 +191,26 @@ docReady( function() {
|
|
|
|
|
|
|
|
|
|
if ( key === 'filter' && value === 'number-greater-than-50' ) { |
|
|
|
|
value = function( elem ) { |
|
|
|
|
var numberText = getText( elem.querySelector('.number') ); |
|
|
|
|
var numberText = elem.querySelector('.number').textContent; |
|
|
|
|
return parseInt( numberText, 10 ) > 40; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
// console.log( key, value ); |
|
|
|
|
iso.options[ key ] = value; |
|
|
|
|
iso.arrange(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// iso.on( 'hideComplete', function( items ) { |
|
|
|
|
// console.log( 'hideComplete', items ); |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
// iso.on( 'revealComplete', function( items ) { |
|
|
|
|
// console.log( 'revealComplete', items ); |
|
|
|
|
// }) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// iso.on( 'arrangeComplete', function( items ) { |
|
|
|
|
// console.log( 'arrangeComplete', items.length ); |
|
|
|
|
// }); |
|
|
|
|
// iso.on( 'hideComplete', function( items ) { |
|
|
|
|
// console.log( 'hideComplete', items ); |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
// iso.on( 'revealComplete', function( items ) { |
|
|
|
|
// console.log( 'revealComplete', items ); |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
function getText( elem ) { |
|
|
|
|
return elem.textContent || elem.innerText; |
|
|
|
|
} |
|
|
|
|
// iso.on( 'arrangeComplete', function( items ) { |
|
|
|
|
// console.log( 'arrangeComplete', items.length ); |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|