I try to use multiple pinterest layout on one page, not nested, only several, with freewall.js
. Each div
I want to apply the layout has a .free-wall
class and each brick has a .brick
class. I tried to adapt the nested layout, but does not work. All ideas will be welcome. thank you.
My script :
$(function() {
$(".free-wall").each(function() {
var wall = new Freewall(this);
wall.reset({
selector: '.brick',
animate: true,
cellW: 200,
cellH: 'auto',
onResize: function() {
wall.fitWidth();
}
});
wall.container.find('.brick img').load(function() {
wall.fitWidth();
});
});
});