https://github.com/halfzebra/jquery-masonry-autofill
https://github.com/halfzebra/jquery-masonry-autofill
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/halfzebra/jquery-masonry-autofill
- Owner: halfzebra
- Created: 2015-10-18T21:16:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-19T07:54:47.000Z (over 10 years ago)
- Last Synced: 2026-01-11T19:52:38.731Z (6 months ago)
- Size: 148 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jQuery.masonryAutoFill
A jQuery plugin for [Masonry](http://masonry.desandro.com/).
Ispired by [Bootstrap + Masonry add blank divs when grid have empty spaces at the bottom](http://stackoverflow.com/questions/33141840/bootstrap-masonry-add-blank-divs-when-grid-have-empty-spaces-at-the-bottom)
Plugin enables Masonry to fill-up empty space at the end of the row if amount of items is uneven in a symmetric grid.
Please see the demo on [JSFiddle](http://jsfiddle.net/7gzrg8wf/).
#### Install with bower:
```sh
$ bower install jquery-masonry-autofill
```
### Usage
Include after jQuery.
```html
```
Call the plugin on onDocumentReady in your JavaScript.
```javascript
$(function() {
// 'itemSelector' property is required.
$('.grid').masonry({itemSelector: '.item'}).masonryAutoFill({
// String to use for filler elements as HTML template.
fillerHtml: '
',
// Optional class name for a filler element.
fillerClassName : 'filler'
});
});
```
### Licence
The jQuery.masonryAutoFill plugin is licensed under the MIT license:
http://en.wikipedia.org/wiki/MIT_License