Open ghost opened 9 years ago
I was able to get this done with some (window).width if statements.
+1
+1
Yes, that's can be done with a single call to justified gallery when a resize is done. I prepare you a simple example to put it into the official documentation. Thank you
Could you please provide an example on how to add different rowheights for different breakpoints? Thank you
hey @miromannino - have you put this example in the official docs yet? I cannot find it
thanks for any help
+1 for the docs update ;)
My take on it:
doTheGrid(); // runs on doc ready
$(window).resize(function() {
doTheGrid();
});
function doTheGrid() {
var w = $(window).width();
if( w > 991 ) {
rowH = 270;
} else {
rowH = 200;
}
// console.log(rowH);
$("#inspirations").justifiedGallery({
selector: 'a.inspirations-item',
rowHeight: rowH,
randomize: false,
margins: 5,
captions: false
});
}
I would like to see the ability to add a different rowheight for each of the breakpoints I work with. 150px is good for 1200px but not 320px.