Jump to content

help with fancybox function to allow adding a hypertext link


webguync
Go to solution Solved by webguync,

Recommended Posts

Hi,

 

I am using fancybox on my site and the function I am using to display the title and data-caption is this.

$(document).ready(function() {
 $('.fancybox').fancybox({
  beforeShow : function(){
   this.title =  this.title +"<br>" + $(this.element).data("caption");
  }
 });
}); // ready

I would like to change this so that I can add a hypertext link.

 

Here is what a sample of the HTML looks like:

				<img src="img/portfolio/GSI_web.png" height="194" width="400" alt="Globalsoftwareinc.com" />
                                        <h4>www.globalsoftwareinc.com</h4>
										 <div class="portfolio-desc align-center">
											<div class="folio-info">
												<h5><a title="globalsoftwareinc.com" href="#" title="www.globalsoftwareinc.com">Globalsoftwareinc.com</a></h5>
												<a title="Global Software Inc. website" href="img/portfolio/GSI_web_large.png" class="fancybox" data-caption="I was the interactive web designer at Global Software, Inc. and assisted in the re-design and development of Global Software, Inc. in Drupal<br>www.globalsoftwareinc.com"><i class="fa fa-plus fa-2x"></i></a>
											 </div>										   
										 </div>
									</div>
                                </article>

so for example I would want to make www.globalsoftwareinc a hyperlink and that isn't do-able currently. It breaks the code.

 

thanks in advance!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.