1
I have the following HTML:
<div class="selectOptions">
<select name="select" id="select">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
and the following code jQuery:
$(".selectOptions").on("mouseover", function () {
$(".selectOptions select").trigger('click');
});
My goal is, when passing the mouse mouseover
on the div
, open the select
.
Is there a way to do that? How? The way I’m doing is not working.
Browsers do not allow this, so it is not possible.
– Tobias Mesquita
Tobias, reference train of this negative for me to study?
– Carlos Rocha
https://stackoverflow.com/questions/430237/is-it-possible-to-use-js-to-open-an-html-select-to-show-its-option-list
– Tobias Mesquita