I made a simple auto suggest box using data list. It does not work in Safari. Is there any work around to it.
<input list="places" placeholder="Enter origin airport" />
<datalist id="places">
<option value="Manchester Ringway Interantional">
<option value="Chicago O'Hare Intl">
<option value="Glasgow International">
<option value="Edinburgh">
<option value="Dubai International">
<option value="New York JFK">
</datalist>
I will be using only these 6 airports. Is there any way to implement it so it works in Safari browser?
Safari does not support
datalist
. You could use jQuery UI Autocomplete Instead. The code will be something like :where
#tags
is the ID of your input element andavailableTags
the list of elements you need.you can try Select2 Plugin, it works with