Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Tool tip action is unexpected on display
19th August, 03:00 (This post was last modified: 19th August 03:11 by ktilcu.)
Post: #1
[Solved] Tool tip action is unexpected on display
http://jsfiddle.net/fDavN/1427/

There is a fiddle for it but it shows up best on my test site:

http://www.6eight6.com/TEST/Alert/map.html

It does not work on the initial hover in the image map, but once you hover for a second time it is ok. Additionally it seems as though the qtip is generating under my mouse so it then goes away immediately. It may have to do with me trying to flip it on the boundaries. I may have missed a positioning option somewhere but i'm not sure.

Thanks in advance.
Find all posts by this user
Quote this message in a reply
21st August, 18:16
Post: #2
RE: Tool tip action is unexpected on display
Got a few options in there at are redundant, see the updated fiddle: http://jsfiddle.net/fDavN/1431/ . Seems to work fine when disabling the positioning effect and setting hide.fixed to true (this prevents it hiding when mousing over the tooltip)

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
21st August, 21:12
Post: #3
RE: Tool tip action is unexpected on display
(21st August 18:16)Craig Wrote:  Got a few options in there at are redundant, see the updated fiddle: http://jsfiddle.net/fDavN/1431/ . Seems to work fine when disabling the positioning effect and setting hide.fixed to true (this prevents it hiding when mousing over the tooltip)

Is there a way to change the target position after viewport flipping. Right now once the flip occurs the tip stays on the target at the same place.so if i am currently at

my: ' bottom center'
target: 'top center'

And the qtip has to flip vertically it changes to

my: 'top center'
target: 'top center'

and covers the link from which it was called.
Find all posts by this user
Quote this message in a reply
22nd August, 00:10
Post: #4
RE: [Solved] Tool tip action is unexpected on display
Normally yes, but because of the way the imagemap plugin works not in this case... it's actually a good catch since I never thought about this discrepancy...

Check-out the fiddle example again that includes the latest commit, as I've added some extra code to take this into account in the imagemap plugin. It's not perfect, but should work 80% of the time and flip it correctly.

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
22nd August, 03:13
Post: #5
RE: [Solved] Tool tip action is unexpected on display
(22nd August 00:10)Craig Wrote:  Normally yes, but because of the way the imagemap plugin works not in this case... it's actually a good catch since I never thought about this discrepancy...

Check-out the fiddle example again that includes the latest commit, as I've added some extra code to take this into account in the imagemap plugin. It's not perfect, but should work 80% of the time and flip it correctly.

Awesome thats perfect. I will keep up-to-date with the nightlies. Thanks for your help!
Find all posts by this user
Quote this message in a reply
24th August, 22:45
Post: #6
RE: [Solved] Tool tip action is unexpected on display
(22nd August 03:13)ktilcu Wrote:  
(22nd August 00:10)Craig Wrote:  Normally yes, but because of the way the imagemap plugin works not in this case... it's actually a good catch since I never thought about this discrepancy...

Check-out the fiddle example again that includes the latest commit, as I've added some extra code to take this into account in the imagemap plugin. It's not perfect, but should work 80% of the time and flip it correctly.

Awesome thats perfect. I will keep up-to-date with the nightlies. Thanks for your help!

Do you know if there would be a good way within this tool to grab an element attribute on the image map and pass it to an ajax loaded tooltip? Looking at the fiddle each county would have an attribute that I would want to pass to the ajax loaded content. (ie ajax.php?countyname) to load dynamic info in the tooltip.
Find all posts by this user
Quote this message in a reply
25th August, 18:24
Post: #7
RE: [Solved] Tool tip action is unexpected on display
Sure, use an each loop:

JS Code
$('area').each(function() {
	$(this).qtip({
		content: {
			ajax: {
				data: { content: $(this).attr('tooltipcontent' }
			}
		}
	});
});

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
25th August, 18:50
Post: #8
RE: [Solved] Tool tip action is unexpected on display
(25th August 18:24)Craig Wrote:  Sure, use an each loop:

JS Code
$('area').each(function() {
	$(this).qtip({
		content: {
			ajax: {
				data: { content: $(this).attr('tooltipcontent' }
			}
		}
	});
});
I probably did a bad job explaining. So in the simplest way possible, if I had an image map with different areas, one of which being:
JS Code
<area shape="poly" coords="66,25,50,38,53,60,67,81,57,90,61,93,36,98,26,22" href="#" alt="EscambiaCounty">

An I wanted to load a separate page via ajax:

JS Code
content: {
            text: 'Loading...',
            ajax: {url:'ajax.php'}
         }


Is there a way to load the ajax.php and pass in the <alt> attribute from the <area> tag?

So it would call the php page like this:

JS Code
ajax.php?EscambiaCounty


I hope I explained better this time.
Find all posts by this user
Quote this message in a reply
27th August, 14:47
Post: #9
RE: [Solved] Tool tip action is unexpected on display
Uh huh
JS Code
$('area').each(function() {
   $(this).qtip({
      content: {
         ajax: {
            url: 'ajax.php? ' + $(this).attr('alt')
         }
      }
   });
});

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
  Qtip "tip" won't display in IE9 cmiller 1 605 21st November 00:55
Last Post: Craig
  [Solved] Use external urls to display relevant data placebo33 4 1,091 8th September 16:16
Last Post: Craig
  [Solved] qtip to display on another in another php/html place holder davidkhan 9 1,344 27th August 14:45
Last Post: Craig
  [Solved] qTip input fields validation not working with display:none Maverick 6 1,414 25th July 16:44
Last Post: Maverick
  specify different positions for separate tool tips c_martini 2 1,010 6th July 19:58
Last Post: Craig
  [Solved] How to disable ugly standard yellow tool tips in IE ictman1105 1 692 22nd June 12:45
Last Post: Craig
  adding DOM action meatbun 1 684 12th March 10:26
Last Post: Craig
  [Solved] qTip slow to display, and hangs around after being destroyed sammyp 1 1,118 16th February 20:55
Last Post: Craig
  [Solved] Tool tip on submit button bensonmi 2 1,132 11th February 15:38
Last Post: bensonmi



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