How to inspect JQuery UI tooltip?

后端 未结 9 1473
一向
一向 2021-01-17 17:48

I have a default JQuery UI tooltip function call on my page. Is there a way to style the tooltip div interactively using the Inspector? If I had two mouse pointers, one woul

9条回答
  •  别那么骄傲
    2021-01-17 18:10

    I found a workaround how to temporary inspect it :

    just implement hide settings where you hookup the tooltip logic:

    hide: {
              effect: "slideDown",
              delay: 20000
          }
    

    This gives you 20 sec time to inspect it. If you need more time then increase the "delay" attribute. Here is my working code for page jquery tooltips:

        $(function() {
        $(document).tooltip({
                tooltipClass: "jqueryTooltip",
                content: function() {
                    return $(this).attr('title');
                },
                hide: {
                    effect: "slideDown",
                    delay: 20000
                }
            });
        });
    

    After you are done with the inspection just remove the delay and you are done.

    Note: I am using custom class "jqueryTooltip" to style the tooltip after inspection.

提交回复
热议问题