1. New
  2. Surprise
  3. More

The Wookmark jQuery plugin

We have received several questions about how the grid layout on wookmark.com is created so we created this simple plugin. It lays out a series of elements in a dynamic column grid.

How to use it

  1. Download the Javascript plugin file from the Github repository
  2. Include the file in your website (after your include of jQuery)

  3. Run it on your content

  4. Adjust the options (they are all optional)

    • container - the width of this element is used to calculate the number of columns, defaults to "window". For example $('myContentGrid'). Container should also have the CSS property "position: relative".
    • offset - vertical and horizontal distance between items, defaults to 2
    • itemWidth - width of a single grid item, defaults to width of first provided item

To contribute, visit Wookmark on github.

Wookmark jQuery plugin example

A live example

Below are the current 20 most popular images on wookmark.com. The Wookmark plugin detects the size of the window and automatically organizes the images into columns. Resize your browser to see the layout adjust. Note how the columns are approximately of equal height.

  • Don't worry, just freak out | We Heart It
  • DIY Pretty Bead Necklace DIY Projects | UsefulDIY.com
  • Don't worry, just freak out | We Heart It
  • Little white lies
  • tumblr_m8fuht1qAx1r2lohvo1_500.jpg (500×687)
  • Trust
  • Bug
  • Fifa Interface Concept on
  • tumblr_lr9rtmeQG11qar35mo1_500.jpg (419×700)
  • tumblr_mmt9msMca81qz4d4bo1_500.jpg (404×604)
  • ??? ????????
  • Don't worry, just freak out | We Heart It
  • Rocket by Fraser Davidson
  • bug
  • Brand New: Minsk Gets in Line
  • DIY Pretty Yarn Flower DIY Projects | UsefulDIY.com
  • How Are You I'm Fine Thanks
  • 94bc2d0c680d6a306de093c3a65768a1.jpg (600×2169)
  • Mixed Print Design Inspiration