View Full Version : AddThis icons in lightbox disappear

07-19-2012, 11:02 AM
I'm trying to use Lightbox2 with the standard AddThis code. When I first load the page and select an image I see the AddThis links under the image (as desired). However, if I close that Lightbox and click on another one (or the same one) the AddThis links do not appear. If I reload the page the same thing happens, the first Lightbox shows the links but any others I select do not. I have tested this with FF, Chrome and IE on different machines, they all show the same results.

This is the code from AddThis:

<a href="http://likebreathing.com/india/091_india.jpg" rel="lightbox"

onmousedown="this.title='<div class=\'addthis_toolbox addthis_default_style\' addthis:url=\'http://likebreathing.com/india/091_india.jpg\'><a class=\'addthis_button_facebook_like\' fb:like:layout=\'button_count\'></a><a class=\'addthis_button_tweet\'></a><a class=\'addthis_button_pinterest_pinit\'></a><a class=\'addthis_counter addthis_pill_style\'></a></div><script type=\'text/javascript\'>var addthis_config = {\'data_track_addressbar\':true};</script><script type=\'text/javascript\' src=\'http://s7.addthis.com/js/250/addthis_widget.js#pubid=REFCODE\'></script>';"

<img src="http://likebreathing.com/india/t091_india.jpg" alt="India Landscape" /></a>

After lots of Googling I *think* this is a related issue: http://support.addthis.com/customer/portal/questions/132264-addthis-in-a-lightbox
The answer is to 'add the addthis.toolbox() function to the lightbox function'.

Info on addthis.toolbox() here: support.addthis.com/customer/portal/articles/381263-addthis-client-api

I've tried various things, but with no luck.

An example can be seen here: likebreathing.com/exp/india2.html
Code attached to '091_india.jpg' and '176_india.jpg' (top two images in second column).