Auto hide bootstrap tooltip

Dhanil picture Dhanil · Aug 1, 2014 · Viewed 19.3k times · Source

I want to hide automatically the Boostrap tooltip after few seconds.

 <input type="text" title="" data-placement="bottom" style="width:200px" data-toggle="tooltip" autocomplete="off" data-provide="typeahead" class="form-control Waring" name="medicine_name" id="medicine_name" data-original-title="Please Enter Valid medicine name">

Answer

Lars Holm Jensen picture Lars Holm Jensen · Sep 22, 2015

I use this for page-wide auto-hide on all bootstrap tooltips:

$(function () {
   $(document).on('shown.bs.tooltip', function (e) {
      setTimeout(function () {
        $(e.target).tooltip('hide');
      }, 10000);
   });
});