Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/motleyagency/famous-autocomplete-widget
An autocomplete input field that works with Famo.us
https://github.com/motleyagency/famous-autocomplete-widget
Last synced: 21 days ago
JSON representation
An autocomplete input field that works with Famo.us
- Host: GitHub
- URL: https://github.com/motleyagency/famous-autocomplete-widget
- Owner: motleyagency
- Created: 2014-05-19T06:42:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-19T07:26:30.000Z (over 10 years ago)
- Last Synced: 2024-04-17T04:06:59.484Z (9 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 7
- Watchers: 17
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Famous Autocomplete Widget
==========================An autocomplete input field that works with Famo.us. Wraps an InputSurface and provides selectable
options after the user starts typing.Optimized for touch devices, not ready for the mouse-driven web (yet).
Usage
-----// Your basic Famo.us setup
var mainContext = Engine.createContext();// Create the new field
var ai = new AutocompleteInput({
placeholder: 'Favorite musician'
});
// Add it to Famo.us main context
mainContext.add(ai);
ai.addOption("Nikki Sixx");
ai.addOption("Tommy Lee");
ai.addOption("Mick Mars");
ai.addOption("Vince Neil");
ai.addOption("John Corabi");
ai.addOption("Randy Castillo");
ai.addOption("Samantha Maloney");
// Use val() to get the value
ai.on('selected', function(value) {
console.log('selected', value);
});