自动完成显示self.element.propAttr错误 [英] autocomplete showing self.element.propAttr error

查看:113
本文介绍了自动完成显示self.element.propAttr错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery ui Autocomplete.但是显示错误自动完成显示self.element.propAttr错误. 这是我的ajax代码

I am using Jquery ui Autocomplete.But it show error autocomplete showing self.element.propAttr error. this is my ajax code

$.ajax({
        url: "persons.xml",
        dataType: "xml",
        success: function( xmlResponse ) {
            var data = $( "person", xmlResponse ).map(function() {
                return {
                    value: $( "name", this ).text()

                };
            }).get();
            $( "#birds" ).autocomplete({
                source: data,
                minLength: 0

            });


        }

    });

我正在使用xml进行响应,但这似乎不是问题,它似乎已弃用了javascript中的某些功能. 有人可以给我任何解决方案吗?

I am using xml for response but that doesnot seem to be the problem it seems some function in javascript is deprecated. Can anyone give me any solutions for this?

推荐答案

在语句前添加以下行:

jQuery.fn.extend({
 propAttr: $.fn.prop || $.fn.attr
});

这篇关于自动完成显示self.element.propAttr错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆