Masonry API
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
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
- Libraries (2.x)
Installation
- Download and enable the required modules listed above
- Update jQuery (see 'jQuery Compatibility' above)
- Download the Masonry plugin :
- 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 - Download and enable Masonry API (and optionally any sub-modules, see above)
- Check /admin/reports/status to ensure the Masonry plugin was properly detected
