Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI keep tooltip open for debugging (to style it)

I'm trying to style the jQuery UI tooltip but it keeps closing. I've tried the following with no success:

 $("td label").tooltip({

    disabled: true,
    close: function (event, ui) { return false; }

 }).on("click", function () {

    $(this).tooltip("open");
 }).off('focusout mouseleave mouseenter');

Nothing seems to keep it open. When I right click on it to go to Firebug, it vanishes before I have a chance.

like image 915
parliament Avatar asked Jul 30 '13 03:07

parliament


People also ask

How can I display a tooltip message on hover using jquery?

Tooltips are used with the element to display a title in the title box next to the element, when you hover the element with your mouse. Tooltips can be attached to any element. If you want to display tooltip, just add title attribute to input elements and the title attribute value will be used as tooltip.

How to position tooltip jQuery?

The tooltip position is specified with two different configuration properties: position and offset . The position property specifies the position in relation to the trigger element. For example, a value of 'bottom center' will place the tooltip on the bottom edge of the trigger, centered horizontally.

How do you open tool tips?

Tooltip opens on tap and hold of the target element. Tooltip appears when you hover over the target. Tooltip opens on tap and hold of the target element. Tooltip appears when you click a target element.

How do I use tooltip in HTML?

Basic Tooltip HTML: Use a container element (like <div>) and add the "tooltip" class to it. When the user mouse over this <div>, it will show the tooltip text. The tooltip text is placed inside an inline element (like <span>) with class="tooltiptext" .


2 Answers

Call the open method on your tooltips, that will make them stay opened

$("td label").tooltip().tooltip("open");
like image 92
omma2289 Avatar answered Oct 15 '22 10:10

omma2289


Much better option is to pause js execution.

  1. Open Console
  2. Switch to Sources tab
  3. Hover something for tooltip to appear
  4. Click F8 button (maybe different, hover the Pause icon to check the hotkey)
like image 21
Alexander Tretyakov Avatar answered Oct 15 '22 10:10

Alexander Tretyakov