0
jqueryオートコンプリートメソッドに問題があります。常に私はこのエラーを取得する:ASP.NET MVC JQuery-UIオートコンプリート
"Uncaught TypeError: $(...).autocomplete is not a function".
私が間違ってやっている、私のコードの下: _Layout.cshtml:headセクションで :本体部の終わりで
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/themes/base/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/jqueryval")
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/bootstrap-social.css" rel="stylesheet" />
<link href="~/Content/font-awesome.min.css" rel="stylesheet" />
<link href="~/Content/bootstrap-formhelpers.min.css" rel="stylesheet" />
<link href="~/Content/custom.css" rel="stylesheet" />
:
<script src="~/Scripts/custom.min.js"></script>
<script src="~/Scripts/jquery-3.1.1.min.js"></script>
<script src="~/Scripts/jquery-ui-1.12.1.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
とスクリプト:
<script type="text/javascript" language="javascript">
$(document).ready(function() {
$('#somevalue').autocomplete({
source: '@Url.Action("Index","Search")'
});
})