JSFiddle - React, Tailwind, and code Playground
by jfriend00
HTML
<select size="3" id="test">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<div id="result"></div>
CSS
#result {margin-top: 20px;}
JavaScript
function debug(msg) {
$("#result").append(msg + "<br>");
}
$("#test option").click(function() {
debug("option got click");
});
$("#test option").dblclick(function() {
debug("option got dblclick");
});
$("#test").click(function() {
debug("select got click");
});
$("#test").change(function() {
debug("select got change");
});