diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-10-08 07:36:35 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-10-08 07:36:48 -0400 |
commit | 647bab506e288658c8a28dab1083c657ad61951e (patch) | |
tree | 9b479935220462ce1a056f650f8c17e453ecffc3 /demos/tooltip | |
parent | bbcbd6899acd600906da0e0fa9e53c7623db5308 (diff) | |
download | jquery-ui-647bab506e288658c8a28dab1083c657ad61951e.tar.gz jquery-ui-647bab506e288658c8a28dab1083c657ad61951e.zip |
Tooltip demo: Use position option in tracking demo.
Diffstat (limited to 'demos/tooltip')
-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 |