-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexample.html
More file actions
140 lines (117 loc) · 4.8 KB
/
Copy pathexample.html
File metadata and controls
140 lines (117 loc) · 4.8 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Example :: jQuery BEM</title>
<link href="static/style.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-1.7.2.js"></script>
<script src="./jquery.bem.js"></script>
<script src="./bem/jquery.bem.control.js"></script>
<script src="./bem/jquery.bem.list.js"></script>
<script src="./bem/jquery.bem.filter.js"></script>
<script src="./bem/jquery.bem.dropdown.js"></script>
<script src="./bem/jquery.bem.select.js"></script>
</head>
<body>
<div style="margin: 20px 40px;">
<h1>jQuery BEM</h1>
</div>
<div style="margin: 40px;">
<a href="#btn1" class="js-tab b-button">Active</a>
<a href="#btn2" class="js-tab b-button">Active</a>
<a href="#btn3" class="js-tab b-button b-button_disabled">Disabled</a>
</div>
<div style="margin: 40px;">
<span class="js-tab cbx"><span class="cbx__checkmark"><input type="checkbox"/></span></span> cbx<br/>
<label><span class="js-tab cbx"><span class="cbx__checkmark"><input type="checkbox"/></span></span> cbx in label</label><br/>
<span class="js-tab cbx"><span class="cbx__checkmark"><input id="cbx" type="checkbox"/></span></span><label for="cbx"> ctx + label[for]</label>
</div>
<div style="margin: 40px;">
<span class="js-tab b-radio"><span class="b-radio__bubble"><input value="1" name="radio_a" type="radio"/></span></span> radio <br/>
<label><span class="js-tab b-radio"><span class="b-radio__bubble"><input value="3" name="radio_a" type="radio"/></span></span> radio in label</label> <br/>
<span class="js-tab b-radio"><span class="b-radio__bubble"><input id="radio_a" value="4" name="radio_a" type="radio"/></span></span><label for="radio_a"> radio + label[for]</label> <br/>
</div>
<div style="margin: 40px;">
<div class="js-tab b-select">
<select size="1">
<option value="0">zero</option>
<optgroup data-icon="first-group" label="group">
<option value="1">first in group</option>
<option value="2">second</option>
</optgroup>
<option data-icon="ico-three" value="3">3</option>
<option value="4" selected="selected">four</option>
<optgroup data-icon="second" label="-------">
<option value="5">five</option>
<option value="6">six</option>
<option value="7">seven</option>
</optgroup>
<option value="8">last</option>
<option disabled="disabled" value="-">disabled</option>
</select>
<div class="b-select__ctrl"></div>
<div class="b-select__options">
<div class="b-select__options__optgroup">
<div class="b-select__options__optgroup__label">
<span class="icon icon_{{data-icon}}"></span>
<span>{{label}}</span>
</div>
</div>
<div class="b-select__options__option">
<span class="icon icon_{{data-icon}}"></span>
<span>{{text}}</span>
</div>
</div>
</div>
</div>
<div style="margin: 40px;">
<div class="js-tab b-dropdown">
<span class="b-dropdown__ctrl">Dropdown</span>
<div class="b-dropdown__list">
<div class="b-dropdown__list__item">item</div>
<div class="b-dropdown__list__item">item</div>
<div class="b-dropdown__list__item">item</div>
<div class="b-dropdown__list__item b-dropdown__list__item_disabled">item</div>
<div class="b-dropdown__list__item b-dropdown__list__item_disabled">item</div>
<div class="b-dropdown__list__item">item</div>
<div class="b-dropdown__list__item b-dropdown__list__item_disabled">item</div>
<div class="b-dropdown__list__item">item</div>
</div>
</div>
<div class="js-tab js-MoveTo b-dropdown">
<span class="b-dropdown__ctrl">Move to</span>
<div class="b-dropdown__list">
<div class="b-filter">
<div class="b-dropdown__list__filter"><input type="text" class="b-filter__input"/></div>
<div class="b-filter__list">
<div class="js-filter-item b-dropdown__list__item">Inbox</div>
<div class="js-filter-item b-dropdown__list__item">mail.ru</div>
<div class="js-filter-item b-dropdown__list__item">RubaXa.org</div>
<div class="js-filter-item b-dropdown__list__item">RubaXa.org/ibn</div>
<div class="js-filter-item b-dropdown__list__item">RubaXa.org/trash</div>
<div class="js-filter-item b-dropdown__list__item">Drafts</div>
<div class="js-filter-item b-dropdown__list__item">Sent</div>
<div class="js-filter-item b-dropdown__list__item">github.com</div>
<div class="js-filter-item b-dropdown__list__item">Spam</div>
<div class="js-filter-item b-dropdown__list__item">Trash</div>
</div>
</div>
</div>
</div>
</div>
<script>
jQuery(function ($){
$.bem.rename('b-checkbox', 'cbx');
$('.js-MoveTo').on('expand', function (){
$('.b-dropdown :input:first').focus().val('').change();
});
function iTab(){
$('.js-tab').each(function (i){
this.tabIndex = i + 1;
});
}
iTab();
});
</script>
</body>
</html>