responsive masonry grid - Free Download Small Responsive Masonry Grid In jQuery

Free Download Small Responsive Masonry Grid In jQuery

Posted on

This time I will share jQuery Plugin and tutorial about Small Responsive Masonry Grid In jQuery, hope it will help you in programming stack.

responsive masonry grid - Free Download Small Responsive Masonry Grid In jQuery
File Size: 4.93 KB
Views Total: 2650
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Masonry Grid is a tiny and responsive jQuery grid layout plugin that places elements of varying heights in a column-based fluid grid as you’ve seen on Pinterest.com.

See Also:

How to use it:

1. Add as many grid items to the masonry layout.

1 <div class="my-masonry-grid">
2   <div class="my-masonry-grid-item" style="height: 300px;">1</div>
3   <div class="my-masonry-grid-item" style="height: 380px;">2</div>
4   <div class="my-masonry-grid-item" style="height: 320px;">3</div>
5   <div class="my-masonry-grid-item" style="height: 340px;">4</div>
6   <div class="my-masonry-grid-item" style="height: 320px;">5</div>
7   ...
8 </div>

2. Load the main JavaScript file jquery.masonryGrid.js after loading jQuery library.

1 <script src="/path/to/cdn/jquery.min.js"></script>
2 <script src="/path/to/dist/jquery.masonryGrid.js"></script>

3. Initialize the masonry grid and specify the number of columns to generate. Default: 3.

1 $(function(){
2   $('.my-masonry-grid').masonryGrid({
3     'columns': 5
4   });
5 });

4. Determine the screen size at which breakpoint the grid items will be stretched into full width. Default: ‘767’

1 $(function(){
2   $('.my-masonry-grid').masonryGrid({
3     'columns': 5,
4     'breakpoint': 467
5   });
6 });

Changelog:

2021-02-19

  • Update jquery.masonryGrid.js