xxxxxxxxxx
1
<div class="row">
2
<div class="col-md-6 select-outline">
3
4
<select class="mdb-select md-form md-outline colorful-select dropdown-primary">
5
<option value="" disabled selected>Choose your option</option>
6
<option value="1">Option 1</option>
7
<option value="2">Option 2</option>
8
<option value="3">Option 3</option>
9
</select>
10
<label>Example label</label>
11
12
</div>
13
</div>
xxxxxxxxxx
1
.md-outline.select-wrapper+label {
2
top: .5em !important;
3
z-index: 2 !important;
4
}
5
body {
6
background-color: gray;
7
}
8
9
input.select-dropdown {
10
color: white !important;
11
}
xxxxxxxxxx
1
// Material Select Initialization
2
$(document).ready(function() {
3
$('.mdb-select').materialSelect();
4
$('.select-wrapper.md-form.md-outline input.select-dropdown').bind('focus blur', function () {
5
$(this).closest('.select-outline').find('label').toggleClass('active');
6
$(this).closest('.select-outline').find('.caret').toggleClass('active');
7
});
8
});
Console errors: 0