Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created March 7, 2013 09:06
Show Gist options
  • Select an option

  • Save thinkphp/5106626 to your computer and use it in GitHub Desktop.

Select an option

Save thinkphp/5106626 to your computer and use it in GitHub Desktop.
Autosuggest widget based on CUI2 AMD Style.
require(["ready", "dom", "autosuggest"], function(app, dom, widget){
var Autosuggest = widget.autosuggest
var suggestions = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"];
app.ready(function(){
var suggest = Autosuggest(dom.select("#tags"), suggestions)
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment