How to inspect JQuery UI tooltip?

后端 未结 9 1474
一向
一向 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:26

    Here is what I did:

    jQuery(".myDiv").attr("title", 'Hello');
    jQuery(".myDiv").tooltip({close: function( event, ui ) {
      console.log(jQuery(ui.tooltip[0]).html());
    }});
    

    And the console content was:

    Hello

    Also, I placed a breakpoint on the console.log function and then examined the page structure before the end tag, and there was something more:

    
    

    It was possible to change the tooltip styling on the fly using Inspector (tested in Chrome).

提交回复
热议问题