I've added the Pinterest button to my AddThis toolbox on my blog (foodandspice.blogspot.com) according to the instructions found here: http://www.addthis.com/help/third-party-buttons#pinterest-pinit. The Pinterest button displays on my posts and the counter shows the number of pins. But nothing happens when the button is clicked -- it returns a javascript:void(0).
Do I need to do something else? The toolbox is coded as below, with the button code added inside the div code with the facebook, twitter and googleplus buttons:
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e6ffa153b4a0b2b"></script>
<script type='text/javascript'>
document.doAT = function(cl)
{
var myclass = new RegExp('hentry');
var myTitleContainer = new RegExp('post-title');
var myPostContent = new RegExp('post-footer');
var elem = this.getElementsByTagName('div');
for (var i = 0; i < elem.length; i++)
{
var classes = elem[i].className;
if (myclass.test(classes))
{
var container = elem[i];
for (var b = 0; b < container.childNodes.length; b++)
{
var item = container.childNodes[b].className;
if (myTitleContainer.test(item))
{
var link = container.childNodes[b].getElementsByTagName('a');
if (typeof(link[0]) != 'undefined')
{
var url = link[0].href;
var title = link[0].innerHTML;
}
else
{
var url = document.url;
var title = container.childNodes[b].innerHTML;
}
if (typeof(url) == 'undefined'|| url == 'undefined' ){
url = window.location.href;
}
var singleq = new RegExp("'", 'g');
var doubleq = new RegExp('"', 'g');
title = title.replace(singleq, ''', 'gi');
title = title.replace(doubleq, '"', 'gi');
}
if (myPostContent.test(item))
{
var footer = container.childNodes[b];
}
}
var n = document.createElement('div');
var at = "<div class='addthis_toolbox addthis_default_style ' addthis:title='"+title+"' addthis:url='"+encodeURI(url)+"' > <a class='addthis_button_facebook_like' fb:like:layout='button_count'></a> <a class='addthis_button_tweet'></a> <a class='addthis_button_pinterest' pi:pinit:layout='horizontal'></a> <a class='addthis_button_google_plusone' g:plusone:size='medium'></a> </div> ";
n.innerHTML = at;
container.insertBefore(n , footer);
}
}
return true;
};
document.doAT('hentry');
</script>
We discovered that having the Tweet button and Pinterest button on the same page breaks Pinterest. We're working hard on a fix and when one becomes available we're working hard on a fix.
This question is closed to new answers.