Created
June 16, 2016 09:21
-
-
Save chodorowicz/ac363a8411f7a8cdaa38c61f439100aa to your computer and use it in GitHub Desktop.
isotope fitRows example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 20px gutter between columns | |
* using imagesLoaded | |
**/ | |
const $grid = $('.js-features'); | |
$grid.imagesLoaded(() => { | |
$grid.isotope({ | |
filter: '.b2b', | |
itemSelector: '.js-featuresItem', | |
layoutMode: 'fitRows', | |
fitRows: { | |
gutter: 20, | |
} | |
}); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 5 columns, fill whole container | |
**/ | |
.gridItemContainer { | |
width: calc(20% - 4/5 * 20px); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment