I am trying to add a tooltip on a multiselect dropdown control that I created using the Bootstrap-select jQuery plugin.
I tired many ways.
Here is my code snippets:
<select id="multiselect" name="multiselect" class="form-control" multiple="multiple" >
<option value="100000000">Option1</option>
<option value="100000001">Option2</option>
<option value="100000002">Option3</option>
<option value="100000003">Option4</option>
<option value="100000004">Option5</option>
</select>
JS:
$('#multiselect').multiselect({
enableClickableOptGroups: true,
enableCollapsibleOptGroups: true,
enableFiltering: true,
disableIfEmpty: true,
includeSelectAllOption: true,
numberDisplayed: 1,
buttonWidth: '100%',
buttonContainer: '<div class="btn-group" />',
enableCaseInsensitiveFiltering: true,
autoOpen: true,
onChange: function (option, checked) {
},
onSelectAll: function () { },
onDeselectAll: function () { }
});
//for add tooltip way 1
$('#multiselect').tooltip({
placement: 'right',
container: 'body',
title: function () {
// put whatever you want here
return "ToolTip Text...";
}
});
//for add tooltip way 2
$('#multiselect').tooltip({
title: 'test',
trigger: 'hover'
});
How I can add tooltip for dropdown?
question from:
https://stackoverflow.com/questions/65887125/add-a-tooltip-on-bootstrap-multiselect-dropdown 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…