diff --git a/types/jqueryui/index.d.ts b/types/jqueryui/index.d.ts index b67a08d8bca09a..dd53565aa6d4ca 100644 --- a/types/jqueryui/index.d.ts +++ b/types/jqueryui/index.d.ts @@ -927,6 +927,7 @@ declare namespace JQueryUI { } interface TooltipUIParams { + tooltip: JQuery; } interface TooltipEvent { diff --git a/types/jqueryui/jqueryui-tests.ts b/types/jqueryui/jqueryui-tests.ts index 7d54c90731b4e2..dcbbc2174c1561 100644 --- a/types/jqueryui/jqueryui-tests.ts +++ b/types/jqueryui/jqueryui-tests.ts @@ -1753,7 +1753,13 @@ function test_tooltip() { show: { effect: "slideDown", delay: 250 - } + }, + open: function(event, ui) { + ui.tooltip.animate({ top: ui.tooltip.position().top + 5 }, 'fast') + }, + close: function(event, ui) { + ui.tooltip.animate({ top: ui.tooltip.position().top + 5 }, 'fast') + }, }); $(document).tooltip({ items: "img, [data-geo], [title]",