Adding tooltip to the beginning of the bootstrap

This is my code: http://jsfiddle.net/52VtD/7255/

<div class="progress">
  <div class="progress-bar progress-bar-success" style="width: 10%" data-toggle="tooltip" data-placement="bottom">
    <span class="sr-only">35% Complete (success)</span>
  </div>
  <div class="progress-bar progress-bar-warning progress-bar-striped" style="width: 50%" data-toggle="tooltip" data-placement="bottom">
    <span class="sr-only">10% Complete (warning)</span>
  </div>
  <div class="progress-bar progress-bar-danger" style="width: 10%" data-toggle="tooltip" data-placement="bottom">
    <span class="sr-only">10% Complete (danger)</span>
  </div>
</div>

      

JavaScript:

$(document).ready(function() {

    $('.progress').tooltip();

});

      

It doesn't seem to work, tooltips are not displayed. Can anyone explain what I am wrong about?

+3


source to share


1 answer


You can try something like this

$('.progress-bar[data-toggle="tooltip"]').tooltip({
    animated: 'fade',
    placement: 'bottom'
});

      



Have a look at FIDDLE

+2


source







All Articles