I always thought that clicking on labelwould more or less trigger a click on the corresponding form element. However, this does not work when it comes to select. Work "mousedown-on-selectfield" -animation works, but the selection does not open.
I tried this:
<label for="my_id">Click me</label>
<select id="my_id">
<option>1</option>
<option>2</option>
</select>
So what:
<label for="my_id">Click me
<select id="my_id">
<option>1</option>
<option>2</option>
</select>
</label>
Any idea what I'm doing wrong?
PS: Imo there shouldn't be any Javascript here, as this is an html function
source
share