Search code examples
twitter-bootstrapfirefoxfirebug

Firefox and Firebug: how to inspect dynamically generated Bootstrap tooltip?


I would like to add a CSS class to a Bootstrap (3.x) tooltip, but it seems not working. So I would like to use Firebug to inspect the tooltip content. However, when I move my mouse to the Firebug area, the dynamically generated tooltip disappers.

How can I inspect a dynamically generated Bootstrap tooltip?

Here is the jsfiddle link.

<label>
Some Text 
<a href="#" data-toggle="tooltip" title="Tooltip goes here!">?</a>
</label>

$(function() { 
    $('[data-toggle="tooltip"]').tooltip({
        'animation': true,
        'placement': 'top' 
    });
});

Thanks!


Solution

    1. Enable the Script panel
    2. Reload the page
    3. Inspect the <label> element containing Some Text?
    4. Right-click the element and choose Break On Child Addition or Removal from the context menu
    5. Move the mouse over the question mark => The script execution will stop and you'll see a hint showing you the tooltip element.

    enter image description here

    1. Press the Step Over button (enter image description here) or press F10 once, so the element is added to the DOM
    2. Switch to the HTML panel

    => There you'll see the <div> containing the tooltip and you'll be able to check its styles.

    enter image description here