-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
32 lines (26 loc) · 840 Bytes
/
main.js
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
var Chosen=require('./lib/mithChosen.js').MithChosen;
var config = {
list: [], //the list
itemsPerPage: 10, //number of items shown in the list
sortByName: true, //sort
styles: {
width: "200px", //width of the list
selectedBackground: 'black',
selectedForeground: 'white',
background: 'white',
foreground: 'black'
}
};
var chosen=new Chosen(config);
// The list may be updated at any time using the update() method.
chosen.update(['Tabriz', 'Istanbul','Karachi',
'Shanghai','Mumbai','Newyork',
'London','Adelaide','HongKong',
'Chicago','Baku','Cairo',
'Baghdad','Nairobi','Mexico']);
var main = {
view: function(){
return m.component(chosen)
}
};
m.mount(document.body,main);