<input type="checkbox" id="selecctall_neighborhood" name="selecctall_neighborhood" value="selecctall_neighborhood" class="js-wpv-filter-trigger" [wpv-conditional if=" ('[wpv-search-term param="selecctall_neighborhood"]' eq 'selecctall_neighborhood') "]checked="checked"[/wpv-conditional] />
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"
});
}
});
});
Visto en Toolset