Please note that AddThis will be closed for the Labor Day holiday August 30th, 2014 to September 1st, 2014.
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

AddThis and Ajax

metafa Jan 02, 2012 @ 11:25AM EST

I need this question answered:

Trying to load a page via ajax. There is no page reloading, page navigation happens with hashtags (#) .. so the first time (after a page reload) the addThis-plugin is rendered well, the second time it won't even show up or shows up crippled. What can I do about that? Please help!! My code:

<div id="fillme"></div>
var html = '<div class="addthis_toolbox addthis_default_style addthis_32x32_style"><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a></div>';

var cache = jQuery.ajaxSettings.cache;

jQuery.ajaxSettings.cache = true;

// Restore jQuery caching setting
jQuery.ajaxSettings.cache = cache;

I have struggeld hours now.. Someone can help? Thanks!

1 Community Answers

Best Answer
metafa Jan 02, 2012 @ 12:50PM EST

Found the answer myself:

function ReinitializeAddThis(){
if (window.addthis){

window.addthis.ost = 0;

url: "",
dataType: 'script',
success: function(){

@AddThis-devs: PLEASE think of ajax devs! I was really searching for this solution for HOURS....

This question has received the maximum number of answers.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found