Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Category filter styling › Reply To: Category filter styling
April 15, 2024 at 10:15 am
#47777
Keymaster
Hi,
I think the easiest and fastest way is to use a bit of javascript to mark the selected label. In CSS it’s not possible to target parent selectors, so I don’t think there is any other option:
jQuery(function($){
$('.asp_label').on('click', function(){
$(this).parent().find('.asp_label').removeClass('asp_label_selected');
$(this).addClass('asp_label_selected');
});
});
This will add “asp_label_selected” class to the current selection, then you can target it with CSS:
.asp_label_selected {
}