diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/tooltip/tracking.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/demos/tooltip/tracking.html b/demos/tooltip/tracking.html index 914940086..222330838 100644 --- a/demos/tooltip/tracking.html +++ b/demos/tooltip/tracking.html @@ -19,14 +19,16 @@ <script> $(function() { $( ".demo" ).tooltip({ + position: { + my: "left+25 center", + at: "center" + }, open: function( event ) { - var tooltip = $( ".ui-tooltip" ); + var tooltip = $( ".ui-tooltip" ), + positionOption = $( this ).tooltip( "option", "position" ); function position( event ) { - tooltip.position({ - my: "left+25 center", - at: "right+25 center", - of: event - }); + positionOption.of = event; + tooltip.position( positionOption ); } $( document ).bind( "mousemove.tooltip-position", position ); // trigger once to override element-relative positioning |