JSFiddle - React, Tailwind, and code Playground
by mahesh1393
HTML
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/themes/black-tie/jquery-ui.css">
<input id="auto" type="text" />
JavaScript
var items = {
"KEY1": "VALUE1",
"KEY2": "VALUE2",
"KEY3": "VALUE3"
};
$(function () {
$('#auto').autocomplete({
source: function (request, response) {
response($.map(items, function (value, key) {
return {
label: value,
value: key
};
}));
}
});
});