Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Little Filter Question › Reply To: Little Filter Question
April 27, 2023 at 12:33 pm
#42325
Keymaster
Thank you Ivo.
I may have found a possible solution, I changed the custom CSS a bit so that the “::after” tag has a content fetched from a data attribute. Then I added this custom script:
jQuery(function ($) {
$('.asp_m .prosettings .innericon').attr('data-text', 'Alle');
$('.asp_m .prosettings').one('click', function () {
setTimeout(function () {
$('.asp_select_label select').on('change.asp_select2', function () {
let id = $(this).closest('.asp_w').data('id'),
inst = $(this).closest('.asp_w').data('instance'),
val = $(this).val() == '__any__' ? 'Alle' : $(this).val();
$('.asp_m_' + id + '_' + inst + ' .prosettings .innericon').attr('data-text', val);
});
}, 500);
});
});
It should hopefully work. I can’t guarantee anything for 100% since this is a customization, but it should be okay for most cases.
-
This reply was modified 3 years, 1 month ago by
Ernest Marcinko.