JSFiddle - React, Tailwind, and code Playground
HTML
<select>
<option>Foo</option>
<option>Barrrr</option>
<option>Baseball!!</option>
</select>
<input type="text"/>
CSS
.fix {
position: fixed;
}
.normal {
position: absolute;
}
.box{
width: 100px;
height: 100px;
background-color: red;
}
#content {
background-color: blue;
width: 400px;
height: 2400px;
}
JavaScript
$(function(){
var values = $('select').children('option').map(function(i,e){
return e.innerText;
}).get();
alert(values);
});