Couldn’t find an answer to this anywhere, but essentially I am wanting to add an ‘active’ link to the anchor when clicked, then remove it when another anchor is clicked. These anchors are hashed hrefs, not real links, as they are acting as a filter.
Here’s what I have so far:
$('.section-filters a').click(function () {
$(this).addClass('active');
var selector = $(this).attr('data-filter');
$container.isotope({
filter: selector
});
return false;
});
Any help?
Thanks,
R
You can use
removeClassmethod.