I have a project section in my website that has 3 buttons. Each button filters to a specific project. The filter works but the problem is when the page loads it shows all 3 projects instead of just the 1 project pertaining to the current active button.
I am not sure what code to add to only show the current project for the default active button. Any help would be greatly appreciated
I have tried to add a css(display-none) script which hides the item but doesn't bring it back and leaves the space empty on the site as if it was still there.
(function(){
'use strict';
var $projects = $('.projects');
$projects.isotope({
itemSelector: '.item',
layoutMode: 'fitRows'
});
$('ul.filters > li').on('click', function(e){
e.preventDefault();
var filter = $(this).attr('data-filter');
$('ul.filters > li').removeClass('active');
$(this).addClass('active');
$projects.isotope({filter: filter});
});