- Create Account

Popping up to the left if no space on the right

Forums > Tipster > Popping up to the left if no space on the right
Author
Message

1) mparedes Group: Members
Posts: 2 Joined: 12 Nov 2006 Location: US IP: 68.167.--.--
First, great job! I just started playing with it and it is amazing!

Q: Is there a way to duplicate the behavior of the toolip they use is this site:
http://www.istockphoto.com/file_browse.php
and have the tooltip pop up to the left of a link if there is no space on the right?
Notice that this is dynamic and not hard coded for the images that are close to the right side.
Thanks!

2) mparedes Group: Members
Posts: 2 Joined: 12 Nov 2006 Location: US IP: 68.167.--.--
Ok, figured it out:
I changed line number 167

From:
 if  (tipX + tipW + 5 >  sX + wW) tipX = sX + wW - tipW  - 5;
to:
 if (tipX  + tipW + 5 > sX + wW) tipX = tipX - tipW - 2*eval(t[0]);


3) GrahamOrford Group: Members
Posts: 19 Joined: 2 Oct 2004 Location: IP: 77.221.--.--
Hi Angus,

I've noticed that the div.w() function doesn't create the tip width correctly in Opera 9.20. Any idea if it can be worked around?

Cheers,

Graham

4) Angus Turnbull Group: Moderators
Posts: 4235 Joined: 7 Dec 2003 Location: New Zealand IP: 202.137.--.--
Damn. Popping up to the left is the default behaviour of the script if there's insufficient room; if it doesn't it's a bug. Check in another browser.

Your patch is fine but I do really recommend you use SuperNtoe instead of Tipster which is a much newer and superior script.

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.