I am using the bootstrap multiselect plugin provided by http://davidstutz.github.io/bootstrap-multiselect/. I am facing problem with the hover over tooltip with all selected values. It displays unexpected results like in given image.tootip unexpected results
I want to remove the tooltip I have also tried to disable the button title attribute whoes value is displayed in the tooltip. but it doesn't work.
My current code is like this.
Current HTML with PHP Code:
<select class="form-control" multiple name="speciality[]" id="speciality">
<?php if($data=$user->getAllSpecialities()){
foreach($data as $key => $value) {?>
<option selected value="<?php echo $value['speciality_id'];?>">
<?php echo $value['speciality_title'];?>
</option>
<?php }
}?>
</select>
Jquery with multiselect initialization:
$('#speciality').multiselect({
nonSelectedText: 'Select Speciality',
numberDisplayed: 2,
buttonClass: 'btn btn-default',
buttonWidth: '100%',
includeSelectAllOption: true,
allSelectedText:'All',
selectAllValue: 0,
selectAllNumber: false,
maxHeight: 100,
onSelectAll: function() {
$('button[class="multiselect"]').attr('title',false);
}
});
//$('#speciality').tooltip().attr('title', 'all specialities');
To remove tooltip you need to override buttonTitle function in your options.
$('#speciality').multiselect({
nonSelectedText: 'Select Speciality',
numberDisplayed: 2,
buttonClass: 'btn btn-default',
buttonWidth: '100%',
includeSelectAllOption: true,
allSelectedText:'All',
selectAllValue: 0,
selectAllNumber: false,
maxHeight: 100,
onSelectAll: function() {
$('button[class="multiselect"]').attr('title',false);
},
buttonTitle: function() {},
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With