Masonry API

Component ID

1785312

Component name

Masonry API

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

91088

Component created

Component changed

Component body

Provides an API for integrating the jQuery Masonry plugin with Drupal.

From desandro.github.io/masonry:

Masonry is a JavaScript grid layout library. It works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall.

As this is an API module, you will likely want to download some of the sub-modules below that implement this API to provide Masonry functionality to various parts of your site.
Additionally, no styling is provided by this API module or any of the sub-modules. You will need to add your own CSS as described here.

Sub-Modules

jQuery Compatibility

The Masonry plugin requires jQuery v1.6 or greater.
As Drupal 7 only ships with jQuery v1.4.4, you'll need to upgrade jQuery to a later version. You can do this by installing one of the following modules:

Required Modules

Installation

  1. Download and enable the required modules listed above
  2. Update jQuery (see 'jQuery Compatibility' above)
  3. Download the Masonry plugin :
    • v2 with branch 2.x. Rename the file to be located at : /sites/.../libraries/masonry/jquery.masonry.min.js
    • v3 with branch 3.x. Rename the file to be located at :
      /sites/.../libraries/masonry/masonry.pkgd.min.js
  4. Branch 3.x only: you need to create a directory for imagesloaded in the libraries directory and then download the imagesloaded library from http://imagesloaded.desandro.com/imagesloaded.pkgd.min.js. Rename it to be located at :
    /sites/.../libraries/imagesloaded/imagesloaded.pkgd.min.js
  5. Download and enable Masonry API (and optionally any sub-modules, see above)
  6. Check /admin/reports/status to ensure the Masonry plugin was properly detected