Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
specify different positions for separate tool tips
6th July, 14:06 (This post was last modified: 6th July 14:12 by c_martini.)
Post: #1
specify different positions for separate tool tips
I have been given the task of troubleshooting some markup a colleague has put in place as an iframe in facebook. There are 5 icons in the page within the iframe which trigger tool tips (jquery.qtip 1.0.0-rc3) when you hover the mouse pointer over them. Each of them is an li using a title attribute. The issue is that since all of the tooltips use the same positioning, the icons nearest the edges of the iframe on either side cause the tooltip to be partially hidden beyond the boundaries of the iframe when displayed.

What I need them to do is somehow have different positioning for each tooltip. At the moment, all the tooltips use this js:

JS Code
$('.qt').qtip({
		delay:0,
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: {
			border : {
				width : 5,
				radius : 10
			},
			padding : 10,
			tip:true,
			name: 'cream' // Give it some style
		}
	});


How do I give each their own positioning?
Huh[/code]    
Find all posts by this user
Quote this message in a reply
6th July, 15:39
Post: #2
RE: specify different positions for separate tool tips
UPDATE: I have also now tried updating to the latest version of qTip and converting the code over. Still cannot figure out how to adjust the tooltips so that they do not run out of the iframe boundaries and partially hide. I have also tried using the adjust.method property and this has not helped, though I am not proficient in javascript, so I have probably got it wrong:

JS Code
$('.qt').qtip({
		delay: 0,
		position: {
			at: "top center",
			my: "bottom center",
                        adjust: "flip"
		},
		style: {
			tip: true,
			classes: "ui-tooltip-cream"
		}
	});

JS Code
$('.qt').qtip({
		delay: 0,
		position: {
			at: "top center",
			my: "bottom center"
		},
                adjust: {
                        method: "flip"
                },
		style: {
			tip: true,
			classes: "ui-tooltip-cream"
		}
	});


Neither of the above work for me. Any ideas?
Find all posts by this user
Quote this message in a reply
6th July, 19:58
Post: #3
RE: specify different positions for separate tool tips
use viewport: $(window)

JS Code
$('.qt').qtip({
    position: {
        at: "top center",
        my: "bottom center",
        adjust: {
            method: "flip"
        },
        viewport: $(window)
    },
    style: {
        tip: true,
        classes: "ui-tooltip-cream"
    }
});

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] One Target Multiple Tool Tips rd42 1 267 19th February 18:24
Last Post: rd42
  [Solved] Multi tips not 100% times work dmhorse 1 273 9th January 18:19
Last Post: Craig
  [Solved] [Solved] Hide all other tips runge 2 1,054 30th September 14:31
Last Post: knowlton
  [Solved] Tool tip action is unexpected on display ktilcu 8 964 27th August 14:47
Last Post: Craig
  [Solved] How to disable ugly standard yellow tool tips in IE ictman1105 1 692 22nd June 12:45
Last Post: Craig
  Tips Position samuelr7 1 366 16th June 12:45
Last Post: Craig
  On jQuery 1.5.1, tips don't appear in IE7 or IE8 panabee 3 1,434 23rd May 17:51
Last Post: Craig
  Modify the tips Fabiano 4 554 6th April 12:06
Last Post: Fabiano
  [Noobie Alert] Why 13 corner positions? PJonDevelopment 1 403 6th April 05:53
Last Post: kiddailey
  [Solved] Setting default positions? microbe 1 788 20th March 07:35
Last Post: kiddailey



User(s) browsing this thread: 1 Guest(s)