We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d5c618 commit a47f5dcCopy full SHA for a47f5dc
demos/tooltip/tracking.html
@@ -23,12 +23,15 @@
23
my: "left+25 center",
24
at: "center"
25
},
26
- open: function( event ) {
27
- var tooltip = $( ".ui-tooltip" ),
28
- positionOption = $( this ).tooltip( "option", "position" );
+ open: function( event, ui ) {
+ if ( !( /^mouse/.test( event.originalEvent.type ) ) ) {
+ return;
29
+ }
30
+
31
+ var positionOption = $.extend( {}, $( this ).tooltip( "option", "position" ) );
32
function position( event ) {
33
positionOption.of = event;
- tooltip.position( positionOption );
34
+ ui.tooltip.position( positionOption );
35
}
36
$( document ).bind( "mousemove.tooltip-position", position );
37
// trigger once to override element-relative positioning
0 commit comments