JQuery Autocomplete plugin not working with JQuery 1.4.1

Posted by Russ Clark on Stack Overflow See other posts from Stack Overflow or by Russ Clark
Published on 2010-06-14T21:08:54Z Indexed on 2010/06/15 12:42 UTC
Read the original article Hit count: 375

I've been using the JQuery Autocomplete plugin with JQuery version 1.3.2, and it has been working great. I recently updated JQuery in my project to version 1.4.2, and the Autocomplete plugin is now broken. The JQuery code to add items to a textbox on my web page doesn't seem to be getting called at all. Does anyone know if the JQuery Autocomplete plugin is incompatible with JQuery version 1.4.2, and if there is a fix for this problem? Here is some sample code I've built in an ASP.Net web site (which works fine if I change the JQuery file to jquery-1.3.2.js, but nothing happens using jquery-1.4.2.js):

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs"    Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
    <script type="text/javascript" src="js/jquery-1.4.2.js" ></script>
<script type="text/javascript" src="js/jquery.autocomplete.js" ></script>
<script type="text/javascript">
    $(document).ready(function() {
        var data = "Core Selectors Attributes Traversing Manipulation CSS Events    Effects Ajax Utilities".split(" ");
        $(':input:text:id$=sapleUser').autocomplete(data);
    }); 
</script>  
</head>
<body>
<form id="form1" runat="server">
    API Reference: <input id="sapleUser" autocomplete="off" type="text" runat="server" /> (try "C" or "E")  
</form>
</body>
</html>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about plugin