My view is using Custom Search with a taxonomy filter.
I would like to pre-select one of the five taxonomies when the page is originally loaded.
In the JS editor for Search and Pagination I've added the following:
jQuery("#channel-group-group-none").prop("checked", true);
When the page is originally loaded the box is checked, but the output is not filtered.
Once one clicks on another checkbox, however, the filter is applied and both checkboxes are honored by the filter.
I tried using the options in "Frontend events" but none of them allow me to pre-filter the view upon the initial page load. Is there a way that I can have the initial page load show only the posts that match channel-group-group-none ?
I believe I solved my own issue. This seems to work:
jQuery(document).ready(function(){
jQuery("#channel-group-group-none").click();
});
Perhaps making "jQuery(document).ready(function()" available in the "Frontend events" options would be beneficial.
Separately I learned I needed to use .click() instead of .prop("checked", true); in order to actually have the filter applied.