0
jqueryを使用してDjangoでオートコンプリート検索入力を実装しようとしています。jqueryオートコンプリートが定義されていません
私はこの問題に関してかなりの類似の質問を見ましたが、私の特定のケースは何も解決しませんでした。私はhead
に次きbase.html
を拡張し、私のhome.html
クラスで次に
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
:
次のようになり、私はhead
を持っている私のbase.html
クラスで
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" type="text/css" media="all"/>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
home.html
に行くとき

:
は、その後、私は持っている私のhome.html
ファイルの<body>
に:私のhome.html
ために
<input name="object-search"class="form-control "id="search">
<script type="text/javascript">
$(function() {
$("#search").autocomplete({
source: "/api/",
minLength: 1,
});
});
</script>
'jQuery'ライブラリも添付しましたか? – marian0
私のjavascriptの無知を許しますが、この行が何であるかは分かりません: ' 「 – cph2117
私の悪い、すみません、私は何とかそれを逃しました。しかし、あなたの 'home.html'とそれに添付されている' jquery.ui'に確実に添付されているかどうか確認できますか? – marian0