我有usercontrol自动完成功能。在主页面它工作正常,但是当我重定向到其他页面时,它不会woking并且浏览器显示错误消息Uncaught TypeError:$(...)。autocomplete不是函数
<script type="text/javascript">
$(document).ready(function () {
var bla = $("[id$=txtSearch]").val();
$("
[id$=txtSearch]").autocomplete("~/GenericHandler/AutoCompletedHandler.ashx", {
width: 404,
formatItem: function (data, i, n, value) {
if (value.split(",")[1] != "") {
return "<a href='" + value.split(",")[0] + "'><div class='list_item_container'><div class='image_autocomplete'><img style = 'width:160px;height:100px' src='" + value.split(",")[1] + "'/></div><div class='cardname_autocomplete'>" + value.split(",")[2] + "</div></div><div style=\"clear:both;\"></div></a>";
}
else {
return "<a href='" + value.split(",")[0] + "'>" + value.split(",")[2] + "</a>";
}
},
formatResult: function (data, value) {
return value.split(",")[0];
}
});
});
</script>
<link href="~/App_Themes/GCM/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
<script src="~/App_Themes/GCM/js/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="~/App_Themes/GCM/js/jquery.autocomplete.js" type="text/javascript"></script>
在主页面中我包含jquery-1.11.2.min.js我不知道如何解决这个问题。请帮助我感谢提前