I am building my own dropdown options with input field as below:
<input class="search" type="text">
<div class="dropdown">
<div class="option" data-options="1">1</div>
<div class="option" data-options="2">2</div>
<div class="option" data-options="3">3</div>
<div class="option" data-options="4">4</div>
<div class="option" data-options="5">5</div>
</div>
I am little baffled with two functions:
1. When you are in the "input" field, I want to be able to use arrow keyboard button (down or up button) to select one of the options (option css change like .option:hover{background:black; color:white;}and 2. show in the input field as you press the arrow button on the keyboard.
Any suggestions will be much appreciated.
Thank you.

inputfield as a part of theselectionfunction.