bootstrap-switch icon indicating copy to clipboard operation
bootstrap-switch copied to clipboard

Tooltip doesn't work for input checkbox

Open brightproject opened this issue 8 years ago • 3 comments

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/]

brightproject avatar Apr 20 '16 01:04 brightproject

Hi, I need to get it working too.

Are there any workarounds? Or do you found a solution?

Phil795 avatar Oct 20 '16 10:10 Phil795

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()).

laur89 avatar Oct 30 '16 21:10 laur89

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'));
        }
      });

ryan2johnson9 avatar Feb 09 '18 06:02 ryan2johnson9