This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: No filter selected by default

#47980
Ernest MarcinkoErnest Marcinko
Keymaster

It’s not that simple I’m afraid. The checkbox gets checked when the user clicks on the container “.asp_option” element.
An event handler is attached to it (native), which then changes the checkbox property to checked/unchecked, after that it fires the following event:

checkboxElement.dispatchEvent(new Event('asp_chbx_change'));

However you can attach to that event:

jQuery(function($){
    let t;
    t = setInterval(()=>{
        if ( typeof WPD !== 'undefined' && typeof WPD.dom !== 'undefined' ) {
            WPD.dom('input').on('asp_chbx_change', function(){
                console.log('hey')
            });;
        }
    }, 100);
});