$('.modul-category-filter li a').on("click", function(e){
e.preventDefault();
});
$(window).on("resize",function(){
$('.modul-category-teaser-grid ul').trigger('refreshWookmark');
});
$('.modul-category-teaser-grid ul').imagesLoaded(function() {
// Prepare layout options.
var options = {
autoResize: true, // This will auto-update the layout when the browser window is resized.
resizeDelay: 400,
container: $('.modul-category-teaser-grid'), // Optional, used for some extra CSS styling
offset: 0, // Optional, the distance between grid items
align: 'left',
flexibleWidth: false,
fillEmptySpace: false // Optional, fill the bottom of each column with widths of flexible height
};
// Get a reference to your grid items.
var handler = $('.modul-category-teaser-grid ul li'),
filters = $('.modul-category-filter--primary li'),
globalFilters,
andFilters = $('.modul-category-filter--secondary li');
// Call the layout function.
handler.wookmark(options);
/**
* When a filter is clicked, toggle it's active state and refresh.
*/
var onClickFilter = function(event) {
$('.modul-category-filter--secondary li').show();
var item = $(event.currentTarget),
activeFilters = [];
if (!item.hasClass('active')) {
filters.removeClass('active');
andFilters.removeClass('active');
}
item.toggleClass('active');
// Filter by the currently selected filter
if (item.hasClass('active')) {
activeFilters.push(item.data('filter'));
}
globalFilters = activeFilters;
handler.wookmarkInstance.filter(activeFilters);
checkTags();
}
function checkTags(){
$('.modul-category-filter--secondary li').each(function(){
var filter = $(this).data('filter');
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.