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

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 is closed to new answers.

Still need help?

General Topics