I am using wp_dropdown_categories to create a dropdown in the frontend. It creates a nice dropdown select. Now I would like to add
onchange="myFunc()" to the
<select>. I need this to trigger some js function when someone selects specific option.
I also took a look into another relevant codex link, could not figure it out. Is there a native wordpress way of doing this ? If not, can you suggest me a solution. I mean something like this.
<select id="my_cats" class="postform" name="my_cats" onchange="myFunc()">