This commit is contained in:
zino
2021-02-17 19:15:28 +01:00
parent 1011e8b282
commit 0c88fa4a05
3047 changed files with 271147 additions and 4 deletions

View File

@@ -0,0 +1,77 @@
// Product Filter
$(window).load(function() {
"use strict";
var $container = $('.gallery-isotope');
$container.isotope({
layoutMode: "masonry",
itemSelector : '.isotope-item',
transitionDuration: '0.8s'
});
var $optionSets = $('.gallery-filter'),
$optionLinks = $optionSets.find('a');
$optionLinks.click(function(){
var $this = $(this);
// don't proceed if already selected
if ( $this.hasClass('active') ) {
return false;
}
var $optionSet = $this.parents('.gallery-filter');
$optionSet.find('.active').removeClass('active');
$this.addClass('active');
// make option object dynamically, i.e. { filter: '.my-filter-class' }
var options = {},
key = $optionSet.attr('data-option-key'),
value = $this.attr('data-option-value');
// parse 'false' as false boolean
value = value === 'false' ? false : value;
options[ key ] = value;
if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
changeLayoutMode( $this, options );
} else {
// otherwise, apply new options
$container.isotope( options );
}
return false;
});
});
// Product Filter
$(window).load(function() {
"use strict";
var $container = $('.gallery-isotopes');
$container.isotope({
layoutMode: "masonry",
itemSelector : '.isotope-items',
transitionDuration: '0.8s'
});
var $optionSets = $('.gallery-filters'),
$optionLinks = $optionSets.find('a');
$optionLinks.click(function(){
var $this = $(this);
// don't proceed if already selected
if ( $this.hasClass('active') ) {
return false;
}
var $optionSet = $this.parents('.gallery-filters');
$optionSet.find('.active').removeClass('active');
$this.addClass('active');
// make option object dynamically, i.e. { filter: '.my-filter-class' }
var options = {},
key = $optionSet.attr('data-option-key'),
value = $this.attr('data-option-value');
// parse 'false' as false boolean
value = value === 'false' ? false : value;
options[ key ] = value;
if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
changeLayoutMode( $this, options );
} else {
// otherwise, apply new options
$container.isotope( options );
}
return false;
});
});