Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] position container or position target
9th February, 14:52
Post: #1
[Solved] position container or position target
Thanks for the great tooltip! It works beautifully, but I'm trying to position it differently and I'm having trouble with that.

The qtip script I'm using is below. What I'm trying to do is get the tooltip to appear by the div with a class "gerbils". But it still appears by the element with a class of "dogs".

Could you all please have a look and see what I might be doing wrong?

Thanks!

Ann Foley[/i]

JS Code
<script>
$('.dogs').qtip({
   content: 'This is a tooltip',
   style: { 
      padding: 5,
      background: '#FFFFFF',
      color: 'black',
      textAlign: 'left',
      position: { 
	    container: $('div.gerbils') 
      },
      border: 	{
	    radius: 2,
	    color: '#A2D959'
       },
      tip: 'topLeft',
      name: 'dark' // Inherit the rest of the attributes from the preset dark style
   }
})
</script>
Visit this user's website Find all posts by this user
Quote this message in a reply
9th February, 18:58
Post: #2
RE: position container or position target
Anne, the position object isn't a subset of the style object! Watch out for things like that in the future:

JS Code
<script>
$('.dogs').qtip({
   content: 'This is a tooltip',
   position: { 
      container: $('div.gerbils') 
   },
   style: { 
      padding: 5,
      background: '#FFFFFF',
      color: 'black',
      textAlign: 'left',
      border:    {
       radius: 2,
       color: '#A2D959'
       },
      tip: 'topLeft',
      name: 'dark' // Inherit the rest of the attributes from the preset dark style
   }
})
</script>

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
11th February, 01:12
Post: #3
RE: position container or position target
Many thanks! With your help, it works great across browsers.
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] Tip mimic property doesn't change with flip viewport position.method ikhan 2 15 Today 04:58
Last Post: ikhan
  can't hide qtip in a “position: absolute;” div shdog 1 281 14th March 17:35
Last Post: Craig
  [Solved] One Target Multiple Tool Tips rd42 1 267 19th February 18:24
Last Post: rd42
  [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
  show qtip in a specified div or position myapweb 1 587 27th December 17:53
Last Post: Craig
  Access target from "inside" qtip Lynge 6 3,014 19th November 12:08
Last Post: t00f
  [Solved] Corner Position Help Jim95 1 488 11th November 15:37
Last Post: Craig
  [Solved] Problem with Fixed Position div and scrolling homerlex 7 1,466 26th October 19:35
Last Post: Craig



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