bootstrap-switch
bootstrap-switch copied to clipboard
Tooltip doesn't work for input checkbox
Html
<input id="message" type="checkbox" data-toggle="tooltip" title="Message" >
Js
<script type="text/javascript">
$(function () {
$('input[type=checkbox][id=message]').tooltip({
placement: "right",
trigger: "hover"
});
});
</script>
Without bootstrap all working! [http://jsfiddle.net/N9vN8/278/]
Hi, I need to get it working too.
Are there any workarounds? Or do you found a solution?
The tooltip set on the element worked for me, but the actual rendered tooltip box originated from the actual hidden element, which didn't look nice. I ended up adding the tooltip to the switch wrapper element instead (inputElement.parent().parent()).
had this problem too and resolved like so:
$(".my-toggle-class").bootstrapSwitch({
onInit: function(event) {
var $el = $(event.target);
$el.closest(".bootstrap-switch").attr('title', $el.data('originalTitle'));
}
});