webguync Posted September 7, 2014 Share Posted September 7, 2014 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 https://forums.phpfreaks.com/topic/290909-help-with-fancybox-function-to-allow-adding-a-hypertext-link/ Share on other sites More sharing options...
webguync Posted September 8, 2014 Author Share Posted September 8, 2014 never mind. It was just a matter of changing the double quote to single around the links. Link to comment https://forums.phpfreaks.com/topic/290909-help-with-fancybox-function-to-allow-adding-a-hypertext-link/#findComment-1490324 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.