AddThis and AJAX with addthis.toolbox() ?

anagio Jul 09, 2012 03:32PM EDT

I have AddThis within a div tag that refreshes new content when we click on images. The toolbox is not showing up and I read I need to use addthis.toolbox()

I've placed this code below into the div that refreshes but it's still not showing the toolbox.

<div class="addthis_toolbox addthis_default_style" id="sharebox">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium" g:plusone:count="false"></a>
</div>
<!-- AddThis Button END -->
<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=XXXXXXXXXXX"></script>

<script type="text/javascript">
addthis.toolbox()
</script>

This probably isn't correct, would someone show me an example of how to properly use addthis.toolbox() please I would really appreciate it.

1 Community Answers

Paul Jul 10, 2012 04:06PM EDT

After the AJAX loads there should be a way to call the toolbox function. You'll need to call the toolbox function in that section of code as well as include the addthis_toolbox class, like this:

addthis.toolbox('.addthis_toolbox');


This question is closed to new answers.

Still need help?


General Topics

 

Developers