Jump to content

help with fancybox function to allow adding a hypertext link


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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.