BlocksIt.js is a jQuery plugin for creating dynamic grid layout. It manages to convert HTML elements into 'blocks' and position them in well-arranged grid layout like Pinterest.


Dynamic Grid Layout jQuery Plugin

Download BlocksIt.js at
Plugin Article Page »

Change Log

Version 1.0 First Release, 24th April 2012

How to Use?

$(document).ready(function() {
		numOfCol: 4,
		offsetX: 8,
		offsetY: 8,
		blockElement: '.block'

Plugin Options

Type: Int ( Default: 5 )
The number of columns to be created.

Type: Int ( Default: 5 )
Margin left and right for each block.

Type: Int ( Default: 5 )
Margin top and bottom for each block.

Type: String ( Default: div )
Targeted child element, which will converted into blocks.


BlocksIt.js is licensed under the GNU General Public License version 2 or later.

Demo 1

Dynamic grid layout with random generated blocks. REFRESH the page and see different result!

Demo 2

Pinterest dynamic grid layout integrated with CSS3 Transitions. RESIZE your browser to animate these blocks!


Something's not working? Or any other questions regarding this plugin please let me know using comments form in plugin article page.