JSFiddle - React, Tailwind, and code Playground
by andrewwhitaker
HTML
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css">
<form>
<input type="text" id="auto" />
<input type="submit" disabled="disabled" />
</form>
JavaScript
$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$("#auto").autocomplete({
source: availableTags,
change: function (event, ui) {
$(":submit").prop("disabled", !ui.item);
}
});
});