Floating Label
A floating label is a placeholder text for form or input fields, which floats above that field and remains visible once the user starts interacting with that field.
To implement a floating label in the Kendo UI for jQuery MultiSelect, define it either as a string or from a function.
The following example demonstrates how to set the floating label as a string:
<select id="multiselect"></select>
<script>
$(document).ready(function(){
$("#multiselect").kendoMultiSelect({
dataTextField: "text",
dataValueField: "value",
dataSource: [
{ text: "Item1", value: "1" },
{ text: "Item2", value: "2" }
],
label: {
content: "Select an item...",
floating: true
}
});
});
</script>
The following example demonstrates how to set the floating label from a function:
<select id="multiselect"></select>
<script>
$(document).ready(function(){
$("#multiselect").kendoMultiSelect({
dataTextField: "text",
dataValueField: "value",
dataSource: [
{ text: "Item1", value: "1" },
{ text: "Item2", value: "2" }
],
label: {
content: function(){
return "Select an item...";
},
floating: true
}
});
});
</script>