0

I have following HTML.

<select>
    <option>1</option>
    <option>2</option>
    <option>3</option>
</select>

When the user clicks on select input, dropdown opens with option 1, 2 & 3. Now let's say user moves the mouse over option 2. Is there an HTML event which can be used to detect that user has hovered on option 2?

I tried with mouseenter event, it only works when select tag is marked as <select multiple>. For single value it doesn't work.

Pavan Kumar
  • 1,715
  • 1
  • 24
  • 48
  • Try onmouseover: https://www.w3schools.com/jsref/event_onmouseover.asp – Andreto Sep 25 '18 at 09:48
  • 1
    There's no hover/mouse movement related events raised from `option` elements, so what you're attempting is not possible. The marked duplicate is outdated and no longer works. – Rory McCrossan Sep 25 '18 at 09:51

0 Answers0