JQuery UI - Autocomplete not a function -
i getting following error code below. i'm not quite sure how fix problem, know has imports. ideas on how resolve this?
uncaught typeerror: $(...).autocomplete not function
index.php:
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <style> .ui-autocomplete-loading { background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat; } </style> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script> <script> $(function () { function log(message) { $("<div>").text(message).prependto("#log"); $("#log").scrolltop(0); } $("#birds").autocomplete({ source: "search.php", minlength: 2, select: function (event, ui) { log(ui.item ? "selected: " + ui.item.value + " aka " + ui.item.id : "nothing selected, input " + this.value); } }); }); </script>
edit: not same other related questions, since i'm importing jquery-ui.js code. (i didn't forget it)
edit:
both of following true:
if (jquery) { alert("jquery loaded"); } if (jquery.ui) { alert("jquery ui loaded"); }
edit: jsfiddle https://jsfiddle.net/od1xd9l0/
Comments
Post a Comment