kombai / freewall

Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...
MIT License
1.85k stars 375 forks source link

Help to use pintereset #134

Open Ridermansb opened 9 years ago

Ridermansb commented 9 years ago

I'm trying to use the layout on pinterest however unsuccessfully format: The following example

http://jsfiddle.net/1kbpkh80/1/

kombai commented 9 years ago

Hi, you must import to using jQuery. At the top-left page under "Frameworks & Extensions"

Ridermansb commented 9 years ago

Sorry, imported! :http://jsfiddle.net/1kbpkh80/1/

kombai commented 9 years ago

you can try with that:

var wall = new freewall("#pinterest");
wall.reset({
    selector: '.pin',
    cellW: 200,
    cellH: 'auto',
    onResize: function() { return wall.fitWidth(); }
});

wall.fitWidth();

wall.container.find('.pin img').load(function() {
   wall.fitWidth();
});

and for easy you can set .pin with display: inline-block or float: left ..