Languages: English (English )Chinese (Simplified) (简体中文 )
Timezone: Asia/Hong_Kong (GMT+08:00)
Hello,
As the thread you mentioned above, there isn't such a built-in feature within Toolset Views plugin, it needs custom JS codes, if you need more assistance for it, please provide a test site with the same problem, also point out the problem page URL and view URL, I can try to setup a demo for you.
Languages: English (English )Chinese (Simplified) (简体中文 )
Timezone: Asia/Hong_Kong (GMT+08:00)
I have done below modifications in your website:
Edit the post view "Overview products": hidden link
in section "Search and Pagination", change the HTML codes from:
A generic jQuery 'change' event thrown on any other filter element with the CSS class "js-wpv-filter-trigger".
Please test again, check if it is fixed.
And since you are using AJAX search form, you can trigger the same JS codes after AJAX results are loaded with event "js_event_wpv_parametric_search_results_updated", for example, in section "Search and Pagination", click "JS editor", click button "Frontend events", see screenshot: Frontend-events.JPG
Languages: English (English )Chinese (Simplified) (简体中文 )
Timezone: Asia/Hong_Kong (GMT+08:00)
The problem is that you are using static HTML codes to setup the "All plants" checkbox, it will be display as unchecked status always, I have done below modifications in your website:
1) in section "Search and Pagination", change the "All plants" checkbox HTML codes to:
It will pass URL parameter "selecctall_neighborhood", when the URL parameter value is "selecctall_neighborhood", then check the checkbox.
2) As I mentioned above, you can trigger the JS codes with event "js_event_wpv_parametric_search_results_updated", I have added below JS codes:
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.layout (object) The jQuery object for the View layout wrapper
*/
$('#selecctall_neighborhood').click(function(event) { //on click
if(this.checked) { // check select status
$('#check_neighborhood .js-wpv-filter-trigger').each(function() { //loop through each checkbox
this.checked = true; //select all checkboxes with class "checkbox_neighborhood"
});
}else{
$('#check_neighborhood .js-wpv-filter-trigger').each(function() { //loop through each checkbox
this.checked = false; //deselect all checkboxes with class "checkbox_neighborhood"
});
}
});
});
So when you click it 2nd time it will be able to deselect the checkboxes, it is just a demo for your reference.