Javascript Tooltip / Posts /

Can we use this tooltip when we have x and y cordinate of the element

1
Hello ,
Thanks for tooltip.
I am using ajax tooltip . My problem is that using jquery I found the x and f coordinates  of the elemnet and want to show the tooltip based on these coordinates .
Is it possible .
My code is

function showMapTrialToolip(x,y){
              tooltip.ajax(this, "<?php echo $this->url(array('controller'=>'trial', 'action'=>'show-trial-popup'), 'default', true);?>/trial_id/"+id,null, {position:4});
               
            }
I want that tooltip will apper at position x and y
Thanks

Piyush Goyal  10 years ago   viewed: 3525    

1 Answer

1
If you want to position the tooltip not relative to the triggering element, you should set position to be 4, 5, or 6:
4: center
5: top left
6: bottom right

If choosing 4, the x, y will be the offset to the center;
If choosing 5, the x, y will be the offset to the top left of the screen;
If choosing 6, the x, y will be the offset to the bottom right of the screen.
Milo   10 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: