-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathREADME
More file actions
38 lines (30 loc) · 1.01 KB
/
README
File metadata and controls
38 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Backbone JS Widgets
-------------------
>> What is it?
Simple jQuery plugins that use Backbone JS.
Autocomplete Widget
-------------------
Turns a simple input into a useful auto-complete. Provide the Backbone collection and let the plugin do the rest.
Constructs a UL on the fly and positions it right below the input. Your user can navigate with arrow keys or use the mouse.
Demo here: http://www.planbox.com/blog/news/updates/jquery-autocomplete-plugin-for-backbone-js.html
Example:
$(document).ready(function() {
var collection = new Backbone.Collection([
{id:"AB", name:"Alberta"},
{id:"BC", name:"British Columbia"},
{id:"MB", name:"Manitoba"},
// ...
{id:"AP", name:"Armed Forces Pacific"}
]);
$('#states_provinces').autocomplete({
collection: collection,
attr: 'name',
noCase: true,
ul_class: 'autocomplete shadow',
ul_css: {'z-index':1234}
});
});
Resources
---------
Backbone JS: https://github.com/documentcloud/backbone
jQuery Plugins/Authoring: http://docs.jquery.com/Plugins/Authoring