Skip to content
Permalink
Browse files

Tooltip demo: Use position option in tracking demo.

  • Loading branch information...
scottgonzalez committed Oct 8, 2011
1 parent bbcbd68 commit 647bab506e288658c8a28dab1083c657ad61951e
Showing with 8 additions and 6 deletions.
  1. +8 −6 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

0 comments on commit 647bab5

Please sign in to comment.
You can’t perform that action at this time.