Basically, this is what I\'m doing. User visits site, loads \"index.html\" Within index.html, it automatically loads, through AJAX, \"details.html\" into a DIV. I put an ADDTHIS
I had the same problem. Fixed it with the following code. I hope that fixes it for you too.
Original Method:
var script = 'http://s7.addthis.com/js/300/addthis_widget.js?domready=1';
if (window.addthis){
window.addthis = null;
}
$.getScript( script );
New Method:
In AJAX REQUEST you can use like this:-
$.ajax({
url:Url,
type: 'POST',
cache: false,
success: function(res){
var script = 'http://s7.addthis.com/js/250/addthis_widget.js#domready=1';
if (window.addthis) {
window.addthis = null;
window._adr = null;
window._atc = null;
window._atd = null;
window._ate = null;
window._atr = null;
window._atw = null;
}
$.getScript(script);
// your custom code
}
});