Search code examples
javascriptjquerycsstwitter-bootstrap-3tooltip

Bootstrap hide tooltip when clicking on a tab


How can I hide a tooltip() on click? Check my code to understand more clearly.

$(function () {
    $('[data-toggle="tab"]').tooltip();
});

Here's my code: http://jsfiddle.net/e45ggmrb/


Solution

  • Tooltips have a tooltip class, so you can access it by it's class and use .hide():

    $('[data-toggle="tab"]').click(function(){
        $(".tooltip").hide();
    })