views:

36

answers:

1

Hi,

Hoping someone can assist but I am using this jQuery Tooltip plugin jquery tooltip

and am trying to emulate the example for Ex.3 when you hover of it, that is, I would like my tooltip to appear below in my example.

I can get the tooltip to appear correctly but for some reason, is not appearing below but to the right of my hover image.

Could anyone pls assist as to how to get it to appear below my image and NOT the right?

FYI, my image is currently set at the top right of my web page.

Thanks.

+1  A: 

Wow that tooltip literally has no documentation other than that page.,, it appears that the tooltip position is based on where it is on the page. The closer it is to the top of the page, the tip will appear below.

Personally, I'd recommend using a different tooltip script that allows you to set the tooltip position. Something like jQuery Tools Tooltip or qTip.


Well apparently, the currently released qTip script doesn't work with jQuery 1.4.2, but you can download the current build version that does work properly.

Here is some sample code to show you how to use it, and a demo:

$(document).ready(function(){
 $("#demo").qtip({
   content: 'Tooltip Content goes here',
   style: { 
      name: 'cream',           // Inherit from preset style
      tip:  'topMiddle'        // adds the pointy part to the tooltip window
   },
   textAlign: 'center',        // Center the tooltip contents
   position: {
    corner: {
     target: 'bottomMiddle',   // Location of tooltip relative to #demo when it opens
     tooltip: 'topMiddle'      // Portion of tooltip that meets with the target
    }
   }
 });
});
fudgey
thanks for that fudgey - I unfortunately had to go and pick a tooltip plugin with minimal doco. I'll think I'll switch it over to qTip.
tonsils
fudgey, I had ago at this and unfortunately can't getting it working. Do I also need a css file as part of the installation? I have a div tag info with my info image and it doesn't appear to be working. Are you able to provide an quick example? Thanks.
tonsils
I've updated my answer :P
fudgey