Isotope active class when using select menu
Posted
by
Michael
on Stack Overflow
See other posts from Stack Overflow
or by Michael
Published on 2012-07-01T02:56:45Z
Indexed on
2012/07/01
3:16 UTC
Read the original article
Hit count: 139
I am using Metafizzy's Isotope plugin and have it set up to filter using a select menu as seen here: http://jsfiddle.net/trewknowledge/jJZEN/
$(function() {
var $container = $('#container'),
$select = $('#filters select');
$container.isotope({
itemSelector: '.item'
});
$select.change(function() {
var filters = $(this).val();
;
$container.isotope({
filter: filters
});
});
});?
What I am trying to figure out is how I would add a highlight/active class to the selected elements when the filters variable is already being used.
© Stack Overflow or respective owner