1
jui.ready([ "ui.select" ], function(SelectBox) {
2
3
var items = [
4
{ value : 'jennifer', text : 'Jennifer' } ,
5
{ value : 'dark', text : 'Dark' } ,
6
{ value : 'pastel', html : '<strong>Pastel</strong>' } ,
7
{ value : 'pattern', text : 'Pattern' },
8
{ type : 'divider' },
9
{
10
value : 'gradient',
11
html : function () {
12
13
var $dom = $('<img src="http://placehold.it/20x20" width="20px" height="20px" /> <span>Gradient</span>');
14
15
$dom.eq(0).css({
16
'vertical-align': 'middle'
17
});
18
19
$dom.eq(2).css({
20
'color' : 'yellow'
21
})
22
23
return $dom;
24
}
25
}
26
];
27
28
window.themeListRight = new SelectBox('.theme-list-right', {
29
align: 'right',
30
items : items
31
});
32
33
window.themeBottom = new SelectBox('.theme-list-bottom', {
34
items : items,
35
valign: 'bottom',
36
placeholder: 'THEME',
37
event : {
38
change : function (value) {
39
console.log(value);
40
}
41
}
42
});
43
44
});
45