Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 953
curious1 Avatar asked Apr 05 '14 01:04

curious1


2 Answers

  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

like image 180
Sebastian Zartner Avatar answered Oct 27 '22 19:10

Sebastian Zartner


I was looking for How to inspect a JQuery tooltip in firebug

  1. Inspect the element in Firebug
  2. Select the "Event" tab to the right
  3. Disable the mouseoutevent.
  4. Now when the mouse is gone from the element, the tooltip stays. Can be inspected as any other element via FireBug.

Here is a small video: https://youtu.be/msTU8JDnaBU

like image 25
AHeavyObject Avatar answered Oct 27 '22 19:10

AHeavyObject