<a href="#" class="filter-link" data-target=".filter-popup">Показать фильтр</a>
<div class="filter-popup">
</div>
$('.filter-link').click(function (e) {
e.preventDefault();
var selector = $(this).attr('data-target');
if(selector){
var $targetElement = $(selector);
if($targetElement.length){
if($targetElement.hasClass('active')){
$targetElement.removeClass('active');
}else{
$targetElement.addClass('active');
}
}
}
});