30
30
</ head >
31
31
< body >
32
32
< div style ="height: 15px "> </ div >
33
- < div class ="container ">
33
+ < div class ="container-fluid ">
34
34
< div class ="row ">
35
35
< div class ="col-lg-12 ">
36
36
< div class ="logo-wrapper-project ">
65
65
</ div >
66
66
</ div >
67
67
</ div >
68
- < div class ="container ">
68
+ < div class ="container-fluid ">
69
69
< div class ="row ">
70
70
< div class ="col-md-3 ">
71
71
< div class ="sticky-alt ">
76
76
</ a >
77
77
</ p >
78
78
< div class ="btn-group btn-group-justified ">
79
- < a href ="https://github.com/craftpip/bootstrap-fullscreen-select/zipball/master " class ="btn btn-default btn-lg ">
79
+ < a href ="https://github.com/craftpip/bootstrap-fullscreen-select/zipball/master " class ="btn btn-download btn-lg ">
80
80
< i class ="fa fa-download "> </ i > ZIP File
81
81
</ a >
82
- < a href ="https://github.com/craftpip/bootstrap-fullscreen-select/tarball/master " class ="btn btn-default btn-lg "> TAR Ball</ a >
82
+ < a href ="https://github.com/craftpip/bootstrap-fullscreen-select/tarball/master " class ="btn btn-download btn-lg "> TAR Ball</ a >
83
83
</ div >
84
84
< div class ="spacer15 "> </ div >
85
85
< div class ="panel panel-default ">
@@ -107,25 +107,51 @@ <h1 style="margin-top:0px;">bootstrap-fullscreen-select</h1>
107
107
< section id ="usage ">
108
108
< h1 > usage</ h1 >
109
109
< h4 > html: </ h4 >
110
- < pre > < code class ="html "> <select class="form-control" id="mySelectElement"> //your select element
110
+ < pre > < code class ="html "> <select class="form-control" id="theSelect"> // the ID of your select element
111
+ <option value="0">Pizza</option>
112
+ <option value="1">Burger</option>
113
+ <option value="2">Tacos</option>
114
+ <option value="3">Something else</option>
115
+ </select>
116
+
117
+ <button class="btn btn-default" id="theBtn">Show</button> //the ID of the element on which user will interact.</ code > </ pre >
118
+ < h4 > javascript: </ h4 >
119
+ < p >
120
+ IMPORTANT: please use ID to refer to an element.
121
+ you can also use multiple initializations
122
+ </ p >
123
+ < pre > < code class ="js "> $(document).ready(function(){
124
+ bootSelect.init({
125
+ selectControl: '#theSelect', //the select element
126
+ on: '#theBtn', //the element where user will interact
127
+ title: 'What to eat?' //title of the full screen select.
128
+ });
129
+ });
130
+ </ code > </ pre >
131
+
132
+ </ section >
133
+ < section id ="examples ">
134
+ < h1 > examples</ h1 >
135
+ < h3 > select element:</ h3 >
136
+ < div class ="well well-sm ">
137
+ < select class ="form-control " id ="mySelectElement " style ="width:300px;display:inline ">
138
+ < option value ="0 "> Something</ option >
139
+ < option value ="1 "> Something else</ option >
140
+ < option value ="2 "> Something even else</ option >
141
+ < option value ="3 "> Enough</ option >
142
+ </ select >
143
+ < button class ="btn btn-primary " id ="myTriggerBtn "> Select something</ button >
144
+
145
+ < h4 > HTML: </ h4 >
146
+ < p class ="text-primary "> < span class =""> The select elements are shown for demonstration purpose, you can hide then in production.</ span > </ p >
147
+ < pre > < code class ="html "> <select class="form-control" id="mySelectElement"> //your select element
111
148
<option value="0">Something</option>
112
149
<option value="1">Something else</option>
113
150
<option value="2">Something even else</option>
114
151
<option value="3">Enough</option>
115
152
</select>
116
153
117
154
<button class="btn btn-default" id="myTriggerBtn">Show</button> //the element on which user will interact.</ code > </ pre >
118
-
119
- <!--
120
- <select class="form-control" id="mySelectElement" style="width:300px;display:inline">
121
- <option value="0">Something</option>
122
- <option value="1">Something else</option>
123
- <option value="2">Something even else</option>
124
- <option value="3">Enough</option>
125
- </select>
126
-
127
- <button class="btn btn-default" id="myTriggerBtn">Show</button> -->
128
-
129
155
< h4 > javascript: </ h4 >
130
156
< pre > < code class ="js "> $(document).ready(function(){
131
157
bootSelect.init({
@@ -135,19 +161,76 @@ <h4>javascript: </h4>
135
161
});
136
162
});
137
163
</ code > </ pre >
164
+ < p > The plugin fired a change event on the select element on user interaction.</ p >
165
+ < pre > < code class ="js "> $('#mySelectElement').change(function(){
166
+ alert($(this).val());
167
+ });
168
+ </ code > </ pre >
169
+ </ div >
170
+ < h3 > select element attribute multiple:</ h3 >
171
+ < div class ="well well-sm ">
172
+ < select class ="form-control " id ="mySelectMultipleElement " style ="width:300px;display:inline " multiple >
173
+ < option value ="0 "> Something</ option >
174
+ < option value ="1 "> Something else</ option >
175
+ < option value ="2 "> Something even else</ option >
176
+ < option value ="3 "> Enough</ option >
177
+ </ select > < br >
178
+ < button class ="btn btn-primary " id ="myTriggerMultipleBtn "> Select something</ button >
179
+
180
+ < h4 > HTML: </ h4 >
181
+ < p class ="text-primary "> < span class =""> The select elements are shown for demonstration purpose, you can hide then in production.</ span > </ p >
182
+ < pre > < code class ="html "> <select class="form-control" id="mySelectMultipleElement" multiple> //your select element
183
+ <option value="0">Something</option>
184
+ <option value="1">Something else</option>
185
+ <option value="2">Something even else</option>
186
+ <option value="3">Enough</option>
187
+ </select>
188
+
189
+ <button class="btn btn-default" id="myTriggerMultipleBtn">Show</button> //the element on which user will interact.</ code > </ pre >
190
+ < h4 > javascript: </ h4 >
191
+ < pre > < code class ="js "> $(document).ready(function(){
192
+ bootSelect.init({
193
+ selectControl: '#mySelectMultipleElement', //the select element
194
+ on: '#myTriggerMultipleBtn', //the element where user will interact
195
+ title: 'Select multiple things' //title of the full screen select.
196
+ });
197
+ });
198
+ </ code > </ pre >
199
+ < p > The plugin fired a change event on the select element on user interaction.</ p >
200
+ < pre > < code class ="js "> $('#mySelectMultipleElement').change(function(){
201
+ alert($(this).val());
202
+ });
203
+ </ code > </ pre >
204
+ </ div >
138
205
139
- </ section >
140
- < section id ="examples ">
141
- < h1 > examples</ h1 >
142
- < p >
143
-
144
- </ p >
145
206
</ section >
146
207
</ div >
147
208
</ div >
148
209
</ div >
149
210
150
- < script type ="text/javascript " src ="demo.js "> </ script >
211
+ < script type ="text/javascript ">
212
+ // javascript for the
213
+ $ ( document ) . ready ( function ( ) {
214
+ bootSelect . init ( {
215
+ selectControl : '#mySelectElement' , //the select element
216
+ on : '#myTriggerBtn' , //the element where user will interact
217
+ title : 'Select something' //title of the full screen select.
218
+ } ) ;
219
+ bootSelect . init ( {
220
+ selectControl : '#mySelectMultipleElement' , //the select element
221
+ on : '#myTriggerMultipleBtn' , //the element where user will interact
222
+ title : 'Select multiple things' //title of the full screen select.
223
+ } ) ;
224
+ $ ( '#mySelectElement' ) . change ( function ( ) {
225
+ alert ( $ ( this ) . val ( ) ) ;
226
+ } ) ;
227
+ $ ( '#mySelectMultipleElement' ) . change ( function ( ) {
228
+ alert ( $ ( this ) . val ( ) ) ;
229
+ } ) ;
230
+ } ) ;
231
+ </ script >
232
+
233
+ < script type ="text/javascript " src ="demo.js "> </ script > <!-- javascript for the demo page interface. -->
151
234
152
235
</ body >
153
236
0 commit comments