I always thought, that a click on a label
will more or less "trigger" the click on the according form-element.
However this doesn't seem to work when it comes to select
. The "mousedown-on-selectfield"-animation works but the select is not opening.
I tried this:
<label for="my_id">Click me</label>
<select id="my_id">
<option>1</option>
<option>2</option>
</select>
and that:
<label for="my_id">Click me
<select id="my_id">
<option>1</option>
<option>2</option>
</select>
</label>
Any Idea what I am doing wrong?
PS: Imo there should be no need for any Javascript here since this is an html-feature