precheck check boxes on filter bar
-
Since we have learned that using tags/categories does NOT work with the filter bar, eg
[tribe_events filter-bar=”yes” view=”photo” tags=”double-arch-dentate,single-arch-dentate,single-arch-edentulous”](Events are limited on right but then nothing works on filter itself)
I am seeking a way to precheck the radio boxes in the Category section. Unfortunately the element IDs are different each time the page is loaded so this does not work:
<script>document.getElementById(“tribe-events-filterbar-de5f7594-live-surgery”).checked = true;</script>
We need to use a wildcard as all instances of the checkbox do at least END the same, in this case “live-surgery”
I have tried various JS and JQuery with no good result (using inline javascript widget in wpbakery)
$(“[id$=’live-surgery’]”).click();
document.querySelectorAll(“[id$=’live-surgery’]”).checked = true;
etc. Looking for ideas
The page I need help with: [log in to see the link]
- The topic ‘precheck check boxes on filter bar’ is closed to new replies.