Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tooltip position in Google Chrome
17th May, 11:43
Post: #1
Tooltip position in Google Chrome
Hi,

I'm using qTip to create overlays for an interactive map. The content is rendered on the page in hidden divs which are then used to fill the content in for the tooltips. The tooltips are tied to areas on an image map.

Here is the JavaScript that I'm using. There is also a few lines of code to disable the default click behaviour, but that didn't have any affect on the positioning when disabled.

JS Code
getLabel: function(area) {
	var id = $(area).attr('id');
	id = id.split('_');
 
	return $('#' + id[0] + 'Label_' + id[1]);
}
 
var areas = $('.image-map-area'), $this, popup;
areas.each(function() {
	$this = $(this),
	popup = getLabel($this);
	$this.qtip({
		content: popup.html(),
		show: { delay: 0 },
		hide: {
			when: 'mouseout',
			fixed: true
		},
		position: {
			corner: {
				target: 'topLeft',
				tooltip: 'bottomRight'
			}
		},
		style: {
			background: 'black',
			border: {
				width: 1,
				radius: 5,
				color: 'black'
			},
			padding: 5,
			width: 250
		}
	});
});


The getLabel() function is just used to ascertain which hidden content div to use and works fine, as does the actual populating of the tooltip. What isn't working, however, is the position of the tooltip in Chrome.

This is what it is supposed to look like (taken in Firefox):
[Image: firefox_tooltip.png]

And this is what is happening in Chrome:

[Image: chrome_tooltip.png]

The only CSS being applied to the tooltip is this, which is used solely to style the content, and didn't seem to have any effect on the positioning when removed for debugging.

JS Code
.qtip div h2 {
	color: #FFF;
	font-size: 1.2em;
	margin: 0;
	padding: 0;
}
 
.qtip div p {
	color: #FFF;
	padding: 0;
	margin: 0;
}


Can anybody see what I might have done wrong with this?

Thanks.
Find all posts by this user
Quote this message in a reply
18th May, 18:36
Post: #2
RE: Tooltip position in Google Chrome
Hmmm voodoochild try out the new branch release and see if it makes a difference: http://bazaar.launchpad.net/~craig.craig.../1.0/files

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
19th May, 07:47
Post: #3
RE: Tooltip position in Google Chrome
Hi Craig,

Still getting the same problem with the new branch release, unfortunately. Any other thoughts as to what the issue might be?
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] position change when tooltip is cut zuckermanori 6 420 13th February 14:17
Last Post: zuckermanori
  Position of qTip Modal from call within a tooltip chuuke 1 263 17th January 21:54
Last Post: Craig
  Why does the tooltip pop up too low and then slides up into correct position? jbrendel 3 991 16th January 04:24
Last Post: DylanKean1
  Google Calendar like bubble for Jquery FullCalendar tdmohr 13 13,029 18th October 07:22
Last Post: jokepondy
  [Solved] Fixed position for large tooltip? dabd 6 837 17th August 00:54
Last Post: dabd
  [Solved] wrong position using .live() to show tooltip BCLEL 3 1,296 23rd June 14:25
Last Post: BCLEL
  [Solved] How do I manually position a tooltip? jrk_sd 3 1,020 4th May 08:51
Last Post: kiddailey
  Scrolling malfunction with Safari / Chrome Tiago 13 2,479 11th January 09:57
Last Post: Craig
  [Solved] qtip off in firefox and google chrome mickey 9 2,513 29th December 17:51
Last Post: Craig
  Google Chrome Error: Uncaught TypeError nrml 1 1,871 6th December 03:32
Last Post: Craig



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