Test Case Boilerplate

Fork this way...

by TJ VanToll

HTML

<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">
<div class="ui-widget">
    <label for="tags">Tags: </label>     
    <input id="tags" /> 
</div>

JavaScript

var availableTags = ["ActionScript","AppleScript","Asp","BASIC","C","C++","Clojure",
"COBOL","ColdFusion","Erlang","Fortran","Groovy","Haskell",
"Java","JavaScript","Lisp","Perl","PHP","Python","Ruby","Scala",
"Scheme"];

$( "#tags" ).autocomplete({
    source: availableTags,
    change: function(event, ui) {
        console.log(ui);
        if(!ui.item)
            alert('change : item is null');
        else
            alert('change : '+ui.item.value);
    }
});