forked from ljb-2000/theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-multiselect.html
1032 lines (979 loc) · 47 KB
/
form-multiselect.html
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="images/icon.png">
<title>Flat Dream</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,400italic,700,800' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Raleway:300,200,100' rel='stylesheet' type='text/css'>
<!-- Bootstrap core CSS -->
<link href="js/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="js/jquery.gritter/css/jquery.gritter.css" />
<link rel="stylesheet" href="fonts/font-awesome-4/css/font-awesome.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="../../assets/js/html5shiv.js"></script>
<script src="../../assets/js/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="js/jquery.nanoscroller/nanoscroller.css" />
<link rel="stylesheet" type="text/css" href="js/bootstrap.multiselect/css/bootstrap-multiselect.css"/>
<link rel="stylesheet" type="text/css" href="js/jquery.multiselect/css/multi-select.css" />
<link href="css/style.css" rel="stylesheet" />
</head>
<body class="animated">
<div id="cl-wrapper">
<div class="cl-sidebar">
<div class="cl-toggle"><i class="fa fa-bars"></i></div>
<div class="cl-navblock">
<div class="menu-space">
<div class="content">
<div class="sidebar-logo">
<div class="logo">
<a href="index2.html"></a>
</div>
</div>
<div class="side-user">
<div class="avatar"><img src="images/avatar6.jpg" alt="Avatar" /></div>
<div class="info">
<p>40 <b>GB</b> / 100 <b>GB</b><span><a href="#"><i class="fa fa-plus"></i></a></span></p>
<div class="progress progress-user">
<div class="progress-bar" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">50% Complete (success)</span>
</div>
</div>
</div>
</div>
<ul class="cl-vnavigation">
<li><a href="#"><i class="fa fa-home"></i><span>Dashboard</span></a>
<ul class="sub-menu">
<li ><a href="index.html">Version 1</a></li>
<li ><a href="dashboard2.html"><span class="label label-primary pull-right">New</span>Version 2</a></li>
</ul>
</li>
<li><a href="#"><i class="fa fa-desktop"></i><span>Layouts</span></a>
<ul class="sub-menu">
<li><a href="layout-boxed.html"><span class="label label-primary pull-right">New</span>Boxed Layout</a></li>
<li><a href="layout-topbar.html"><span class="label label-primary pull-right">New</span>Top Menu</a></li>
</ul>
</li>
<li><a href="#"><i class="fa fa-smile-o"></i><span>UI Elements</span></a>
<ul class="sub-menu">
<li ><a href="ui-elements.html">General</a></li>
<li ><a href="ui-alerts.html">Alerts</a></li>
<li ><a href="ui-porlets.html"><span class="label label-primary pull-right">New</span>Porlets</a></li>
<li ><a href="ui-buttons.html">Buttons</a></li>
<li ><a href="ui-modals.html">Modals</a></li>
<li ><a href="ui-notifications.html">Notifications</a></li>
<li ><a href="ui-tiles.html"><span class="label label-primary pull-right">New</span>Tiles</a></li>
<li ><a href="ui-progress.html">Progress Bars</a></li>
<li ><a href="ui-icons.html">Icons</a></li>
<li ><a href="ui-grid.html">Grid</a></li>
<li ><a href="ui-tabs-accordions.html">Tabs & Accordions</a></li>
<li ><a href="ui-nestable-lists.html">Nestable Lists</a></li>
<li ><a href="ui-treeview.html">Tree View</a></li>
<li ><a href="ui-calendar.html"><span class="label label-primary pull-right">New</span>Calendar</a></li>
</ul>
</li>
<li><a href="#"><i class="fa fa-list-alt"></i><span>Forms</span></a>
<ul class="sub-menu">
<li ><a href="form-elements.html">Components</a></li>
<li class="active" ><a href="form-multiselect.html"><span class="label label-primary pull-right">New</span>Multiselect</a></li>
<li ><a href="form-validation.html">Validation</a></li>
<li ><a href="form-wizard.html">Wizard</a></li>
<li ><a href="form-masks.html">Input Masks</a></li>
<li ><a href="form-wysiwyg.html">WYSIWYG Editor</a></li>
<li ><a href="form-upload.html">Multi Upload</a></li>
</ul>
</li>
<li><a href="#"><i class="fa fa-table"></i><span>Tables</span></a>
<ul class="sub-menu">
<li ><a href="tables-general.html">General</a></li>
<li ><a href="tables-datatables.html"><span class="label label-primary pull-right">New</span>Data Tables</a></li>
<li ><a href="tables-xeditable.html"><span class="label label-primary pull-right">New</span>X-Editable</a></li>
</ul>
</li>
<li><a href="#"><i class="fa fa-map-marker nav-icon"></i><span>Maps</span></a>
<ul class="sub-menu">
<li ><a href="maps.html">Maps</a></li>
<li ><a href="vector-maps.html">Vector Maps</a></li>
</ul>
</li>
<li><a href="#"><i class="fa fa-envelope nav-icon"></i><span>Email</span></a>
<ul class="sub-menu">
<li ><a href="email-inbox.html">Inbox</a></li>
<li ><a href="email-read.html">Email Detail</a></li>
<li ><a href="email-compose.html"><span class="label label-primary pull-right">New</span>Email Compose</a></li>
</ul>
</li>
<li ><a href="typography.html"><i class="fa fa-text-height"></i><span>Typography</span></a></li>
<li ><a href="charts.html"><i class="fa fa-bar-chart-o"></i><span>Charts</span></a></li>
<li><a href="#"><i class="fa fa-file"></i><span>Pages</span></a>
<ul class="sub-menu">
<li ><a href="pages-blank.html">Blank Page</a></li>
<li ><a href="pages-blank-header.html">Blank Page Header</a></li>
<li ><a href="pages-blank-aside.html">Blank Page Aside</a></li>
<li ><a href="pages-blank-aside-header.html"><span class="label label-primary pull-right">New</span>Blank Page Aside Header</a></li>
<li ><a href="pages-profile.html"><span class="label label-primary pull-right">New</span>Profile</a></li>
<li><a href="pages-login.html">Login</a></li>
<li><a href="pages-sign-up.html"><span class="label label-primary pull-right">New</span>Sign Up</a></li>
<li><a href="pages-forgot.html"><span class="label label-primary pull-right">New</span>Forgot Password</a></li>
<li><a href="pages-404.html">404 Page</a></li>
<li><a href="pages-500.html">500 Page</a></li>
<li ><a href="pages-tour.html"><span class="label label-primary pull-right">New</span>Tour Guide</a></li>
<li ><a href="pages-gallery.html">Gallery</a></li>
<li ><a href="pages-search.html"><span class="label label-primary pull-right">New</span>Search</a></li>
<li ><a href="pages-timeline.html">Timeline</a></li>
<li ><a href="pages-code-editor.html">Code Editor</a></li>
</ul>
</li>
<li class=""><a href="javascript:;"><i class="fa fa-folder-open"></i><span class="title">Menu Levels</span><span class="arrow "></span></a>
<ul class="sub-menu">
<li><a href="javascript:;">Level 1</a></li>
<li><a href="javascript:;"><span class="title">Level 2</span><span class="arrow "></span></a>
<ul class="sub-menu">
<li><a href="javascript:;">Sub Menu</a></li>
<li><a href="ujavascript:;">Sub Menu </a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="text-right collapse-button" style="padding:7px 9px;">
<input type="text" class="form-control search" placeholder="Search..." />
<button id="sidebar-collapse" class="btn btn-default" style=""><i style="color:#fff;" class="fa fa-angle-left"></i></button>
</div>
</div>
</div>
<div class="container-fluid" id="pcont">
<!-- TOP NAVBAR -->
<div id="head-nav" class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-collapse">
<ul class="nav navbar-nav navbar-right user-nav">
<li class="dropdown profile_menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img alt="Avatar" src="images/avatar6-2.jpg" /><span>Jane Smith</span> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">My Account</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
<li class="divider"></li>
<li><a href="#">Sign Out</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav not-nav">
<li class="button dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class=" fa fa-inbox"></i></a>
<ul class="dropdown-menu messages">
<li>
<div class="nano nscroller">
<div class="content">
<ul>
<li>
<a href="#">
<img src="images/avatar2.jpg" alt="avatar" /><span class="date pull-right">13 Sept.</span> <span class="name">Daniel</span> Hey! How are you?
</a>
</li>
<li>
<a href="#">
<img src="images/avatar_50.jpg" alt="avatar" /><span class="date pull-right">20 Oct.</span><span class="name">Adam</span> Hi! Can you fix my phone?
</a>
</li>
<li>
<a href="#">
<img src="images/avatar4_50.jpg" alt="avatar" /><span class="date pull-right">2 Nov.</span><span class="name">Michael</span> Regards!
</a>
</li>
<li>
<a href="#">
<img src="images/avatar3_50.jpg" alt="avatar" /><span class="date pull-right">2 Nov.</span><span class="name">Lucy</span> Hello, my name is Lucy
</a>
</li>
</ul>
</div>
</div>
<ul class="foot"><li><a href="#">View all messages </a></li></ul>
</li>
</ul>
</li>
<li class="button dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-globe"></i><span class="bubble">2</span></a>
<ul class="dropdown-menu">
<li>
<div class="nano nscroller">
<div class="content">
<ul>
<li><a href="#"><i class="fa fa-cloud-upload info"></i><b>Daniel</b> is now following you <span class="date">2 minutes ago.</span></a></li>
<li><a href="#"><i class="fa fa-male success"></i> <b>Michael</b> commented on your link <span class="date">15 minutes ago.</span></a></li>
<li><a href="#"><i class="fa fa-bug warning"></i> <b>Mia</b> commented on post <span class="date">30 minutes ago.</span></a></li>
<li><a href="#"><i class="fa fa-credit-card danger"></i> <b>Andrew</b> sent you a request <span class="date">1 hour ago.</span></a></li>
</ul>
</div>
</div>
<ul class="foot"><li><a href="#">View all activity </a></li></ul>
</li>
</ul>
</li>
<li class="button"><a class="toggle-menu menu-right push-body" href="javascript:;"><i class="fa fa-comments"></i></a></li>
</ul>
</div><!--/.nav-collapse animate-collapse -->
</div>
</div>
<div class="cl-mcont"> <div class="page-head">
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Forms</a></li>
<li class="active">Multiselect</li>
</ol>
</div>
<div class="row">
<div class="col-sm-12">
<div class="block-flat">
<div class="header">
<h3>Basic</h3>
</div>
<div class="content">
<table class="dashed">
<tr>
<td>
<select id="example1">
<option value="css" selected>CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Normal select. The plugin will do single selection using radio buttons rather than multiple selection using checkboxes.
</td>
</tr>
<tr>
<td>
<select id="example2" multiple="multiple">
<option value="css" selected>CSS</option>
<option value="html" selected>HTML</option>
<option value="php" selected>PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Select with preselected options: <code><option value="css" selected>CSS</option></code>
</td>
</tr>
<tr>
<td>
<select id="example27" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Multiselect with a 'Select all' option
</td>
</tr>
<tr>
<td>
<select id="example28" multiple="multiple"></select>
</td>
<td>
Multiselect with a 'Select all' option and filtering enabled using the <code>enableFiltering</code> option.
</td>
</tr>
<tr>
<td>
<select id="example41" multiple="multiple">
<option value="css" selected>CSS</option>
<option value="html" selected>HTML</option>
<option value="php" selected>PHP</option>
<option value="javascript" selected>Javascript</option>
<option value="jquery" selected>jQuery</option>
<option value="ajax" selected>AJAX</option>
</select>
</td>
<td>
The 'Select all' option automatically repsonds to the selection of the user. In particular, it responds to the initial state of the select.
</td>
</tr>
<tr>
<td>
<select id="example4" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Small button using <code>buttonClass: 'btn btn-default btn-sm'</code>.
</td>
</tr>
<tr>
<td>
<div class="input-group btn-group">
<span class="input-group-addon"><i class="fa fa-archive"></i></span>
<select id="example6" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</div>
</td>
<td>
Multiple select within a group with add-ons and default container for the plugin: <code>buttonContainer: '<div class="btn-group" />'</code>.
</td>
</tr>
<tr>
<td>
<select id="example9" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Using the <code>onChange</code> option you can add an event handler to the change event. The event handler gets the selected option as first parameter and a variable saying whether the option is checked or not as second one.
</td>
</tr>
<tr>
<td>
<select id="example11" multiple="multiple">
</select>
</td>
<td>
For long option lists the <code>maxHeight</code> option can be set.
</td>
</tr>
<tr>
<td>
<select id="example13" multiple="multiple">
<option value="enabled1">Enabled 1</option>
<option value="enabled2">Enabled 2</option>
<option value="disabled2" disabled="disabled">Disabled 1</option>
</select>
</td>
<td>
The plugin supports disabled options, too: <code>disabled="disabled"</code>
</td>
</tr>
<tr>
<td>
<select id="example14" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Use the <code>buttonWidth</code> option to adjust the width of the button.
</td>
</tr>
<tr>
<td>
<select id="example16" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Using the <code>onChange</code> option to prevent user from deselecting selected options.
</td>
</tr>
<tr>
<td>
<select id="example19" multiple="multiple">
<optgroup label="Mathematics">
<option value="analysis">Analysis</option>
<option value="algebra">Linear Algebra</option>
<option value="discrete">Discrete Mathematics</option>
<option value="numerical">Numerical Analysis</option>
<option value="probability">Probability Theory</option>
</optgroup>
<optgroup label="Computer Science">
<option value="programming">Introduction to Programming</option>
<option value="automata">Automata Theory</option>
<option value="complexity">Complexity Theory</option>
<option value="software">Software Engineering</option>
</optgroup>
</select>
</td>
<td>
Option groups are detected automatically and for each option group an header element is added: <code><optgroup label="Mathematics">...</optgroup></code>
</td>
</tr>
<tr>
<td>
<select id="example23" multiple="multiple">
<option value="lab">Lab Course</option>
<option value="proseminar">Proseminar</option>
<optgroup label="Mathematics">
<option value="analysis">Analysis</option>
<option value="algebra">Linear Algebra</option>
<option value="discrete">Discrete Mathematics</option>
<option value="numerical">Numerical Analysis</option>
<option value="probability">Probability Theory</option>
</optgroup>
<optgroup label="Computer Science">
<option value="programming">Introduction to Programming</option>
<option value="automata">Automata Theory</option>
<option value="complexity">Complexity Theory</option>
<option value="software">Software Engineering</option>
</optgroup>
</select>
</td>
<td>
Option groups and options without any group are supported simultaneously.
</td>
</tr>
<tr>
<td>
<select id="example20" multiple="multiple">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Using the <code>selectedClass</code> option to turn off the active class for selected options.
</td>
</tr>
<tr>
<td>
<select id="example24" multiple="multiple">
<option value="analysis" label="Ana">Analysis</option>
<option value="algebra" label="LA">Linear Algebra</option>
<option value="discrete" label="Discrete">Discrete Mathematics</option>
<option value="numerical" label="NumA">Numerical Analysis</option>
<option value="probability" label="Proba">Probability Theory</option>
</select>
</td>
<td>
Specifiy an alternaitve label for the options: <code><option label="label"></option></code>
</td>
</tr>
<tr>
<td>
<div class="pull-left">
<select id="example25" multiple="multiple">
<option value="analysis" label="Ana">Analysis</option>
<option value="algebra" label="LA">Linear Algebra</option>
<option value="discrete" label="Discrete">Discrete Mathematics</option>
<option value="numerical" label="NumA">Numerical Analysis</option>
<option value="probability" label="Proba">Probability Theory</option>
</select>
</div>
</td>
<td>
Make the menu drop right instead of dropping left with <code>dropRight</code>.
</td>
</tr>
<tr>
<td>
<select id="example26" multiple="multiple" data-role="multiselect">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
Using the <code>data-role="multiselect"</code> attribute for automatic wireup.
</td>
</tr>
<tr>
<td>
<select id="example31" multiple="multiple" data-role="multiselect" disabled>
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
The multiselect will adopt the state of the select: <code><select disabled></select></code>.
</td>
</tr>
<tr>
<td>
<select id="example32" multiple="multiple" tabindex="1">
<option value="css">CSS</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="javascript">Javascript</option>
<option value="jquery">jQuery</option>
<option value="ajax">AJAX</option>
</select>
</td>
<td>
The button will keep the <code>tabindex</code> of the select.
</td>
</tr>
<tr>
<td>
<select id="example39" multiple="multiple">
<option value="lab">Lab Course</option>
<option value="proseminar">Proseminar</option>
<optgroup label="Mathematics">
<option value="analysis">Analysis</option>
<option value="algebra">Linear Algebra</option>
<option value="discrete">Discrete Mathematics</option>
<option value="numerical">Numerical Analysis</option>
<option value="probability">Probability Theory</option>
</optgroup>
<optgroup label="Computer Science">
<option value="programming">Introduction to Programming</option>
<option value="automata">Automata Theory</option>
<option value="complexity">Complexity Theory</option>
<option value="software">Software Engineering</option>
</optgroup>
</select>
</td>
<td>
Using <code>optgroups</code>s with filtering and the select all option.
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="block-flat">
<div class="header">
<h3>Boxed Multiselect</h3>
</div>
<div class="content">
<table class="dashed">
<tr>
<td>
<select multiple="multiple" id="my-select" name="my-select[]">
<option value='elem_1'>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3'>elem 3</option>
<option value='elem_4'>elem 4</option>
<option value='elem_5'>elem 5</option>
<option value='elem_6'>elem 6</option>
<option value='elem_7'>elem 7</option>
</select>
</td>
<td>Activates your content as a multiselect.</td>
</tr>
<tr>
<td>
<select id='pre-selected-options' multiple='multiple'>
<option value='elem_1' selected>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3' selected>elem 3</option>
<option value='elem_4'>elem 4</option>
<option value='elem_5' selected>elem 5</option>
<option value='elem_6'>elem 6</option>
<option value='elem_7'>elem 7</option>
</select>
</td>
<td>Select with preselected options: <code><option value="elem_3" selected>elem 3</option></code></td>
</tr>
<tr>
<td>
<select id='callbacks' multiple='multiple'>
<option value='elem_1'>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3'>elem 3</option>
<option value='elem_4'>elem 4</option>
<option value='elem_5'>elem 5</option>
<option value='elem_6'>elem 6</option>
<option value='elem_7'>elem 7</option>
</select>
</td>
<td>The event handler gets the selected option as first parameter and a variable saying whether the option is checked or not as second one. </td>
</tr>
<tr>
<td>
<select id='optgroup' multiple='multiple'>
<optgroup label='Jedi'>
<option value='1'>Yoda</option>
<option value='2' selected>Obiwan</option>
</optgroup>
<optgroup label='Sith'>
<option value='3'>Palpatine</option>
<option value='4' disabled>Darth Vader</option>
</optgroup>
</select>
</td>
<td>Option groups are detected automatically and for each option group an header element is added</td>
</tr>
<tr>
<td>
<select id='disabled-attribute' disabled='disabled' multiple='multiple'>
<option value='elem_1'>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3'>elem 3</option>
<option value='elem_4'>elem 4</option>
<option value='elem_5'>elem 5</option>
<option value='elem_6'>elem 6</option>
<option value='elem_7'>elem 7</option>
</select>
</td>
<td>You can also deactivate option one by one by adding disabled attribute to each option you want to disable <br><code><option value='fuu' disabled='disabled'>bar</option></code></td>
</tr>
<tr>
<td>
<select id='custom-headers' multiple='multiple'>
<option value='elem_1'>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3'>elem 3</option>
<option value='elem_4'>elem 4</option>
<option value='elem_5'>elem 5</option>
<option value='elem_6'>elem 6</option>
<option value='elem_7'>elem 7</option>
</select>
</td>
<td>This option add a header to the multiselect box.</td>
</tr>
<tr>
<td>
<select id='searchable' multiple='multiple'>
<option value='elem_1'>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3' selected>elem 3</option>
<option value='elem_4'>elem 4</option>
<option value='elem_5'>elem 5</option>
<option value='elem_6'>elem 6</option>
<option value='elem_7' selected>elem 7</option>
</select>
</td>
<td>Adds a search bar to filter options</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Right Chat-->
<nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right side-chat">
<div class="header">
<h3>Chat</h3>
</div>
<div class="sub-header">
<div class="icon"><i class="fa fa-user"></i></div> <p>Online (4)</p>
</div>
<div class="content">
<p class="title">Family</p>
<ul class="nav nav-pills nav-stacked contacts">
<li class="online"><a href="#"><i class="fa fa-circle-o"></i> Michael Smith</a></li>
<li class="online"><a href="#"><i class="fa fa-circle-o"></i> John Doe</a></li>
<li class="online"><a href="#"><i class="fa fa-circle-o"></i> Richard Avedon</a></li>
<li class="busy"><a href="#"><i class="fa fa-circle-o"></i> Allen Collins</a></li>
</ul>
<p class="title">Friends</p>
<ul class="nav nav-pills nav-stacked contacts">
<li class="online"><a href="#"><i class="fa fa-circle-o"></i> Jaime Garzon</a></li>
<li class="outside"><a href="#"><i class="fa fa-circle-o"></i> Dave Grohl</a></li>
<li><a href="#"><i class="fa fa-circle-o"></i> Victor Jara</a></li>
</ul>
<p class="title">Work</p>
<ul class="nav nav-pills nav-stacked contacts">
<li><a href="#"><i class="fa fa-circle-o"></i> Ansel Adams</a></li>
<li><a href="#"><i class="fa fa-circle-o"></i> Gustavo Cerati</a></li>
</ul>
</div>
<div id="chat-box">
<div class="header">
<span>Richard Avedon</span>
<a class="close"><i class="fa fa-times"></i></a>
</div>
<div class="messages nano nscroller">
<div class="content">
<ul class="conversation">
<li class="odd">
<p>Hi Jane, how are you?</p>
</li>
<li class="text-right">
<p>Hello I was looking for you</p>
</li>
<li class="odd">
<p>Tell me what you need?</p>
</li>
<li class="text-right">
<p>Sorry, I'm late... see you</p>
</li>
<li class="odd unread">
<p>OK, call me later...</p>
</li>
</ul>
</div>
</div>
<div class="chat-input">
<div class="input-group">
<input type="text" class="form-control" placeholder="Enter a message...">
<span class="input-group-btn">
<button type="button" class="btn btn-primary">Send</button>
</span>
</div>
</div>
</div>
</nav>
<script src="js/jquery.js"></script>
<script src="js/jquery.cookie/jquery.cookie.js"></script>
<script src="js/jquery.pushmenu/js/jPushMenu.js"></script>
<script type="text/javascript" src="js/jquery.nanoscroller/jquery.nanoscroller.js"></script>
<script type="text/javascript" src="js/jquery.sparkline/jquery.sparkline.min.js"></script>
<script type="text/javascript" src="js/jquery.ui/jquery-ui.js" ></script>
<script type="text/javascript" src="js/jquery.gritter/js/jquery.gritter.js"></script>
<script type="text/javascript" src="js/behaviour/core.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/bootstrap/dist/js/bootstrap.min.js"></script>
<style type="text/css">
#color-switcher{
position:fixed;
background:#272930;
padding:10px;
top:50%;
right:0;
margin-right:-109px;
}
#color-switcher .toggle{
cursor:pointer;
font-size:15px;
color: #FFF;
display:block;
position:absolute;
padding:4px 10px;
background:#272930;
width:25px;
height:30px;
left:-24px;
top:22px;
}
#color-switcher p{color: rgba(255, 255, 255, 0.6);font-size:12px;margin-bottom:3px;}
#color-switcher .palette{padding:1px;}
#color-switcher .color{width:15px;height:15px;display:inline-block;cursor:pointer;}
#color-switcher .color.purple{background:#7761A7;}
#color-switcher .color.green{background:#19B698;}
#color-switcher .color.red{background:#EA6153;}
#color-switcher .color.blue{background:#54ADE9;}
#color-switcher .color.orange{background:#FB7849;}
#color-switcher .color.prusia{background:#476077;}
#color-switcher .color.yellow{background:#fec35d;}
#color-switcher .color.pink{background:#ea6c9c;}
#color-switcher .color.brown{background:#9d6835;}
#color-switcher .color.gray{background:#afb5b8;}
</style>
<div id="color-switcher">
<p>Select Color</p>
<div class="palette">
<div class="color purple" data-color="purple"></div>
<div class="color green" data-color="green"></div>
<div class="color red" data-color="red"></div>
<div class="color blue" data-color="blue"></div>
<div class="color orange" data-color="orange"></div>
</div>
<div class="palette">
<div class="color prusia" data-color="prusia"></div>
<div class="color yellow" data-color="yellow"></div>
<div class="color pink" data-color="pink"></div>
<div class="color brown" data-color="brown"></div>
<div class="color gray" data-color="gray"></div>
</div>
<div class="toggle"><i class="fa fa-angle-left"></i></div>
</div>
<script type="text/javascript">
var link = $('link[href="css/style.css"]');
if($.cookie("css")) {
link.attr("href",'css/style-' + $.cookie("css") + '.css');
}
$(function(){
$("#color-switcher .toggle").click(function(){
var s = $(this).parent();
if(s.hasClass("open")){
s.animate({'margin-right':'-109px'},400).toggleClass("open");
}else{
s.animate({'margin-right':'0'},400).toggleClass("open");
}
});
$("#color-switcher .color").click(function(){
var color = $(this).data("color");
$("body").fadeOut(function(){
//link.attr('href','css/style-' + color + '.css');
$.cookie("css", color, {expires: 365, path: '/'});
window.location.href = "";
$(this).fadeIn("slow");
});
});
});
</script> <script type="text/javascript" src="js/bootstrap.multiselect/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="js/jquery.multiselect/js/jquery.multi-select.js"></script>
<script type="text/javascript" src="js/jquery.quicksearch/jquery.quicksearch.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#example1').multiselect();
$('#example2').multiselect();
$('#example3').multiselect({
buttonClass: 'btn btn-link'
});
$('#example4').multiselect({
buttonClass: 'btn btn-default btn-sm'
});
$('#example6').multiselect();
$('#example9').multiselect({
onChange:function(element, checked){
alert('Change event invoked!');
console.log(element);
}
});
for (var i = 1; i <= 100; i++) {
$('#example11').append('<option value="' + i + '">Options ' + i + '</option>');
}
$('#example11').multiselect({
maxHeight: 200
})
$('#example13').multiselect();
$('#example14').multiselect({
buttonWidth: '500px',
buttonText: function(options) {
if (options.length === 0) {
return 'None selected <b class="caret"></b>';
}
else {
var selected = '';
options.each(function() {
selected += $(this).text() + ', ';
});
return selected.substr(0, selected.length -2) + ' <b class="caret"></b>';
}
}
});
$('#example16').multiselect({
onChange: function(option, checked) {
if (checked === false) {
$('#example16').multiselect('select', option.val());
}
}
});
$('#example19').multiselect();
$('#example20').multiselect({
selectedClass: null
});
$('#example23').multiselect();
$('#example24').multiselect();
$('#example25').multiselect({
dropRight: true,
buttonWidth: '300px'
});
$('#example27').multiselect({
includeSelectAllOption: true
});
// Add options for example 28.
for (var i = 1; i <= 100; i++) {
$('#example28').append('<option value="' + i + '">' + i + '</option>');
}
$('#example28').multiselect({
includeSelectAllOption: true,
enableFiltering: true,
maxHeight: 150
});
$('#example32').multiselect();
$('#example39').multiselect({
includeSelectAllOption: true,
enableCaseInsensitiveFiltering: true
});
$('#example41').multiselect({
includeSelectAllOption: true
});
//multi-select boxed
$('#my-select').multiSelect()
$('#pre-selected-options').multiSelect();
$('#callbacks').multiSelect({
afterSelect: function(values){
alert("Select value: "+values);
},
afterDeselect: function(values){
alert("Deselect value: "+values);
}
});
$('#optgroup').multiSelect({ selectableOptgroup: true });
$('#disabled-attribute').multiSelect();
$('#custom-headers').multiSelect({
selectableHeader: "<div class='custom-header'>Selectable items</div>",
selectionHeader: "<div class='custom-header'>Selection items</div>",
});
$('#searchable').multiSelect({
selectableHeader: "<input type='text' class='form-control search-input' autocomplete='off' placeholder='Search'>",
selectionHeader: "<input type='text' class='form-control search-input' autocomplete='off' placeholder='Search'>",
afterInit: function(ms){
var that = this,
$selectableSearch = that.$selectableUl.prev(),
$selectionSearch = that.$selectionUl.prev(),
selectableSearchString = '#'+that.$container.attr('id')+' .ms-elem-selectable:not(.ms-selected)',
selectionSearchString = '#'+that.$container.attr('id')+' .ms-elem-selection.ms-selected';
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
.on('keydown', function(e){
if (e.which === 40){