输入框上的自动完成:未捕获的类型错误:未定义不是函数在jquery中

时间:2015-04-22 05:17:00

标签: jquery angularjs

当我选择任何值时,它会给我错误,当我对任何项目进行聚焦时,它会再次给出相同的错误。

$("#auto").autocomplete({
    source: function (request, response) {
        var posting = $http({
            type: "GET",
            url: "/auto",
            data: request
        }) // request is the value of search input
        posting.success(function (data) {
            console.log('hello43434');
            // Map response values to fiedl label and value
            response($.map(data, function (el) {
                return {
                    label: el.name,
                    value: el._id
                };
            }));
        })
        posting.error(function (error) {
            console.log(error);
        })
    },

这是我所有文件的序列

<head>
    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css">
    <script src="schscript/angular.js"></script>
    <script src="schscript/schAngularController.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.13/angular-ui-router.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
</head>

0 个答案:

没有答案