javascript – Materialise.css自动完成不使用Polymer
作者:互联网
我想在我的Polymer项目中使用Materialize.css autocomplete.
控制台日志:
Uncaught TypeError: $(...).autocomplete is not a function
我的代码:
<div class="input-field">
<input type="text" id="assemp" class="autocomplete" value="{{emps::input}}">
<label for="assemp">Assigned Employee(s)</label>
</div>
脚本:
attached : function() {
$('input.autocomplete').autocomplete({
data: {
"Apple": null,
"Microsoft": null,
"Google": 'http://placehold.it/250x250'
}
});
}
最佳答案:
$(document).ready(function () {$('input.autocomplete').autocomplete({
data: {
"Apple": null,
"Microsoft": null,
"Google": null
}});});
标签:jquery,javascript,polymer,polymer-1-0,materialize 来源: https://codeday.me/bug/20190516/1115173.html