Practices
Line 12: | Line 12: | ||
layoutMode: 'fitRows' | layoutMode: 'fitRows' | ||
}); | }); | ||
− | + | ||
$('.filter-button-group').on( 'click', 'li', function() { | $('.filter-button-group').on( 'click', 'li', function() { | ||
+ | $('.filter-button-group li').removeClass('checked'); | ||
+ | $(this).addClass('checked'); | ||
var filterValue = $(this).attr('data-filter'); | var filterValue = $(this).attr('data-filter'); | ||
+ | |||
$people.isotope({ filter: filterValue }); | $people.isotope({ filter: filterValue }); | ||
}); | }); | ||
Line 21: | Line 24: | ||
<div class="row"> | <div class="row"> | ||
<ul class="filter-button-group col-md-12"> | <ul class="filter-button-group col-md-12"> | ||
− | <li data-filter="*"><a class="btn-filter btn">All</a></li> | + | <li class="checked" data-filter="*"><a class="btn-filter btn">All</a></li> |
<li data-filter=".world"><a class="btn-filter btn">World to Sirens</a></li> | <li data-filter=".world"><a class="btn-filter btn">World to Sirens</a></li> | ||
<li data-filter=".siren"><a class="btn-filter btn">Sirens to World</a></li> | <li data-filter=".siren"><a class="btn-filter btn">Sirens to World</a></li> |