Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add link in tip
3rd March, 23:05 (This post was last modified: 3rd March 23:08 by monica.)
Post: #1
How to add link in tip
Hello there, I am wondering if anyone can tell me how I add a link into the qtip popup? I am a bit of beginner, so maybe this is obvious. Currently, I have the popup text in the title tag. This is what my code looks like and I attached an image of the result. Thank you so much for any assistance
JS Code
<p class="quickanswer">
      <a href="#" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rutrum dui et augue commodo sed pharetra dui convallis. Mauris ultrices, velit id sollicitudin consequa. ">
      This is a question?
      </a>
      </p>


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
4th March, 15:38
Post: #2
RE: How to add link in tip
monica, if you require HTML in your qTip I'd suggest moving from element attributes to actual tooltip elements on the page e.g.

JS Code
<p class="quickanswer">
      <a class="hasTooltip" href="#">This is a question?</a>
      <span class="tooltipContent">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rutrum dui et augue commodo sed pharetra dui convallis. Mauris ultrices, 
      velit id sollicitudin consequa.</span>
</p>


Then use something similar to this:

JS Code
giveTooltips.each(function(){
   // Skip if no .tooltipContent is found next to this element
   if( $(this).next('.tooltipContent').length < 1 ) { return true; }
 
   $(this).qtip({
      content: $(this).next('.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
4th March, 17:18
Post: #3
RE: How to add link in tip
Craig,
Thanks for the tip. The only question I have is:
Where do you put the "givetoolTips..." code?


(4th March 15:38)Craig Wrote:  monica, if you require HTML in your qTip I'd suggest moving from element attributes to actual tooltip elements on the page e.g.

JS Code
<p class="quickanswer">
      <a class="hasTooltip" href="#">This is a question?</a>
      <span class="tooltipContent">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rutrum dui et augue commodo sed pharetra dui convallis. Mauris ultrices, 
      velit id sollicitudin consequa.</span>
</p>


Then use something similar to this:

JS Code
giveTooltips.each(function(){
   // Skip if no .tooltipContent is found next to this element
   if( $(this).next('.tooltipContent').length < 1 ) { return true; }
 
   $(this).qtip({
      content: $(this).next('.tooltipContent')
   });
});
Find all posts by this user
Quote this message in a reply
6th March, 15:13
Post: #4
RE: How to add link in tip
Wrap it in a $(document).ready() callback and stick it at the footer of the page.

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
1st June, 20:13
Post: #5
RE: How to add link in tip
Hi,
Hi, my name is Stefano founder of monujo, a budget management startup from italy

I try to integrate qtip to my wordpress blog in the same way written here

http://www.comespendo.it/2011/05/27/obie...sparmio-2/

see the widget in sidebar "Nuovi Iscritti"

the code is this

HTML Code
<div class="user"><a href="http://www.comespendo.it/author/admin/"><span class="avatar"><img src="http://0.gravatar.com/avatar/21fbab9a04fc3cc884ccff1dc64eb1d6?s=50&d=wavatar&r=G" class="avatar avatar-50 photo" height="50" width="50" alt="admin" title="admin"></span><div class="tooltipContent"><span class="avatar"><img src="http://0.gravatar.com/avatar/21fbab9a04fc3cc884ccff1dc64eb1d6?s=50&d=wavatar&r=G" class="avatar avatar-50 photo" height="50" width="50" alt="admin" title="admin"></span><div id="qa-user-details">
			<img src="http://www.comespendo.it/wp-content/themes/platformpro/images/icons/rank3.gif"> Livello 3 : <b>100</b> <b>Nome</b> : admin
</div></div></a></div>


and in footer i added this
JS Code
<script class="example" type="text/javascript">
// Create the tooltips only on document load
$(document).ready()
{
giveTooltips.each(function(){
  // Skip if no .tooltipContent is found next to this element
  if( $(this).next('.tooltipContent').length < 1 ) { return true; }
 
  $(this).qtip({
     content: $(this).next('.tooltipContent')
  });
});
});
</script>


but qtip is not working

what have I made wrong ?

searching also for a developer in order to fix this bug

regards
Stefano
Find all posts by this user
Quote this message in a reply
5th June, 10:41
Post: #6
RE: How to add link in tip
Well I can't see any tooltipContent elements in your code, so maybe that's why Wink

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
5th June, 17:20
Post: #7
RE: How to add link in tip
mmm, in the sidebar here http://www.comespendo.it/2011/05/27/obie...sparmio-2/ under Nuovi Iscritti widget

there is a here is <div class="tooltipContent"> ....

is it not ok ?

thanks for your answer Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Link needs to be clicked twice sunwise 1 80 17th April 18:26
Last Post: Craig
  [Solved] Add Reload to Button otti.steinhauer 3 272 29th February 19:31
Last Post: Craig
  Link Tooltip is not opened toplisek 2 538 5th January 09:53
Last Post: toplisek
  [Solved] Qtip getting ID of link naupadnara 2 401 4th January 16:19
Last Post: naupadnara
  [Solved] add an image to the qtip? knowlton 2 984 21st October 04:58
Last Post: nevf
  [Solved] Why is this not working - Link nested in tooltip needed 1 538 12th September 17:10
Last Post: Craig
  qtip code altering the link state/classes on page? qqtime 4 1,097 20th July 14:49
Last Post: Craig
  [Solved] Add div tage in Qtip. Elango 1 1,019 12th July 17:31
Last Post: Craig
  [Solved] In Safari browser how to remove "close window" link scottd 3 1,620 29th December 19:08
Last Post: Craig
  [Solved] Pulling "data" variable from link? ben_allison 1 632 29th October 20:41
Last Post: ben_allison



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