https://github.com/tomi77/backbone-forms-bootstrap-typeahead
Backbone-Forms Bootstrap TypeAhead editor
https://github.com/tomi77/backbone-forms-bootstrap-typeahead
backbone-forms bootstrap typeahead
Last synced: about 2 months ago
JSON representation
Backbone-Forms Bootstrap TypeAhead editor
- Host: GitHub
- URL: https://github.com/tomi77/backbone-forms-bootstrap-typeahead
- Owner: tomi77
- License: mit
- Created: 2018-01-15T07:15:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T14:53:41.000Z (over 7 years ago)
- Last Synced: 2025-02-06T13:20:59.382Z (4 months ago)
- Topics: backbone-forms, bootstrap, typeahead
- Language: CoffeeScript
- Homepage: https://tomi77.github.io/backbone-forms-bootstrap-typeahead/
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Backbone-Forms Bootstrap TypeAhead editor
[](https://travis-ci.org/tomi77/backbone-forms-bootstrap-typeahead)
[](https://codeclimate.com/github/tomi77/backbone-forms-bootstrap-typeahead)
[](https://david-dm.org/tomi77/backbone-forms-bootstrap-typeahead)
[](https://david-dm.org/tomi77/backbone-forms-bootstrap-typeahead#type=dev)
[](https://david-dm.org/tomi77/backbone-forms-bootstrap-typeahead#type=peer)## Installation
~~~bash
bower install backbone-forms-bootstrap-typeahead
~~~or
~~~bash
npm install backbone-forms backbone-forms-bootstrap-typeahead
~~~## Usage
~~~js
var states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',
'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii',
'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana',
'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota',
'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire',
'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota',
'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island',
'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',
'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'
];var Model = Backbone.Model.extend({
schema: {
name: {
type: 'bootstrap.typeahead',
title: 'Name',
options: states
}
}
});
var model = new Model();
var form = new Backbone.Form({
model: model
});
$('#form').html(form.render().$el);
~~~## Demo
http://tomi77.github.io/backbone-forms-bootstrap-typeahead/