<div class="col l4 m6 s12 gallery-item gallery-expand gallery-filter bigbang">
<div class="gallery-curve-wrapper">
<a class="gallery-cover gray">
<img class="responsive-img" src="img/bigbang1.png" alt="placeholder">
</a>
<div class="gallery-header">
<span>Gallery Link</span>
</div>
<div class="gallery-body">
<div class="title-wrapper">
<h3>Grapefruit</h3>
<span class="price">$14.99</span>
</div>
</div>
<div class="gallery-action">
<a class="btn-floating btn-large waves-effect waves-light">
<i class="material-icons">favorite
</i></a>
</div>
</div>
</div>
Option | Description |
---|---|
inDuration | Transition duration for opening the gallery in ms. Default: 300 |
outDuration | Transition duration for closing the gallery in ms. Default: 200 |
responsiveThreshold | Breakpoint for full width style in pixels. Default: 992 |
contentPadding | Padding for content in the gallery in pixels. Default: 40 |
onShow | Callback function that is fired when the gallery is opened. |
defaultColor | Fallback color for when color thief fails. Default: '#444' |
fillScreen | Enable the full width image transition style. Default: false |
// Open
$('.gallery-expand').galleryExpand('open');
// Close
$('.gallery-expand').galleryExpand('close');
var $masonry = $('.gallery');
$masonry.masonry({
// set itemSelector so .grid-sizer is not used in layout
itemSelector: '.gallery-item',
// use element for option
columnWidth: '.gallery-item',
// no transitions
transitionDuration: 0
});
// layout Masonry after each image loads
$masonry.imagesLoaded(function() {
$masonry.masonry('layout');
});
<!-- Visible in the custom-category filter -->
<div class="col l4 m6 s12 gallery-item gallery-expand gallery-filter custom-category">
...
</div>
<!-- Always Visible -->
<div class="col l4 m6 s12 gallery-item gallery-expand gallery-filter all">
...
</div>
<div class="categories-container">
<ul class="categories container">
<li><a href="#all">All</a></li>
<li><a href="#custom-category">Custom Category</a></li>
</ul>
</div>
$masonry.masonry({
// set itemSelector so .grid-sizer is not used in layout
itemSelector: '.gallery-filter',
// use element for option
columnWidth: '.gallery-filter',
// no transitions
transitionDuration: 0
});
// Only desktop style
$('.gallery-expand').galleryExpand({
responsiveThreshold: 0
});
// Only mobile style
$('.gallery-expand').galleryExpand({
responsiveThreshold: Infinity
});
$('.gallery-expand').galleryExpand({
onShow: function(el) {
// Carousel
var carousel = el.find('.carousel.initialized');
carousel.carousel({
dist: 0,
padding: 10
});
// Tabs
$('ul.tabs').tabs();
}
});