Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="UTF-8" />
<title>jQuery UI Real Autocomplete</title>
javas
 <!-- jQuery UI  |  http://jquery.com/  http://jqueryui.com/  http://jqueryui.com/docs/Theming -->
<style type="text/css">
  body{font:62.5% Verdana,Arial,sans-serif}</style>
  
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
  
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  
  
  
  
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
</head>
<body>
<label for="tags">Tags:</label>
<input id="tags" value="">
<script>
  $(function() {
    var availableTags = [
      "ActionScript",
      "AppleScript",
      "Asp",
      "BASIC",
      "C",
      "C++",
      "Clojure",
      "COBOL",
      "ColdFusion",
      "Erlang",
      "Fortran",
      "Groovy",
      "Haskell",
      "Java",
      "JavaScript personal",
      "Lisp useful",
      "Perl",
      "PHP",
      "Python",
      "Ruby",
      "Scala",
      "Scheme"
    ];
    alert('works');
    $( "#tags" ).autocomplete({
      alert('works');
      source: function(request, response) {
        var filteredArray = $.map(availableTags, function(item
                                 ) {
      alert(item);
          if(item.indexOf(request.term) == 0){
            return item;
              }
              else{
                  return null;
              }
          });
          response(filteredArray);
      }
      
      
    });
  });
  </script>
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers