Browse Source

stagger sandboxes

pull/1127/head
David DeSandro 9 years ago
parent
commit
09fd5cf885
  1. 5
      sandbox/filter-sort.html
  2. 11
      sandbox/insert.html

5
sandbox/filter-sort.html

@ -154,14 +154,13 @@
<script src="../js/layout-modes/fit-rows.js"></script>
<script src="../js/layout-modes/vertical.js"></script>
<script src="../bower_components/isotope-cells-by-row/cells-by-row.js"></script>
<script>
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
layoutMode: 'fitRows',
transitionDuration: '0.8s',
transitionDuration: 400,
stagger: '0.1s',
cellsByRow: {
columnWidth: 130,
rowHeight: 140,

11
sandbox/insert.html

@ -49,15 +49,16 @@
var container = document.querySelector('#container');
var iso = new Isotope( container, {
layoutMode: 'masonry',
stagger: 50,
transitionDuration: '0.8s',
getSortData: {
b: 'b parseInt'
},
sortBy: 'b',
// filter b greater than 40
filter: function( elem ) {
return parseInt( elem.querySelector('b').textContent, 10 ) > 40
}
// filter: function( elem ) {
// return parseInt( elem.querySelector('b').textContent, 10 ) > 40
// }
});
document.querySelector('#prepend').addEventListener( 'click', function() {
@ -95,6 +96,10 @@ function appendItem() {
return item;
}
iso.on( 'layoutComplete', function() {
console.log('layout complete');
});
</script>
</body>

Loading…
Cancel
Save