so basically the original code at 
http://docs.jquery.com/Plugins/Autocomplete#Example
is
[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                    "http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js";></script>
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/
plugins/autocomplete/demo/main.css" type="text/css" />
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.dimensions.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.js"></script>
  <script>
  $(document).ready(function(){
    var data = "Core Selectors Attributes Traversing Manipulation CSS
Events Effects Ajax Utilities".split(" ");
$("#example").autocomplete(data);
  });
  </script>

</head>
<body>
  API Reference: <input id="example" /> (try "C" or "E")
</body>
</html>
[/code]

and then i added the search feature (http://docs.jquery.com/Plugins/
Autocomplete#Search_Page_Replacement)
[code]
var data = [ {text:'Link A', url:'/page1'}, {text:'Link B', url: '/
page2'} ];
$("...").autocomplete(data, {
  formatItem: function(item) {
    return item.text;
  }
}).result(function(event, item) {
  location.href = item.url;
});
[/code]

=

[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                    "http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js";></script>
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/
plugins/autocomplete/demo/main.css" type="text/css" />
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.dimensions.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.js"></script>
  <script>
  $(document).ready(function(){
  var data = [ {text:'Link A', url:'http://www.jquery.com/'},
{text:'Link B', url: 'http://docs.jquery.com/Plugins/
Autocomplete#Search_Page_Replacement'} ];
$("#example").autocomplete(data);

  </script>

</head>
<body>
  API Reference: <input id="example" /> (try "C" or "E")
</body>
</html>
[/code]

but when i type  "link" or "jquery" nothing turns up

Reply via email to