Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save carloscastillop/9cc381971f183a9c6057c19b5c2ada4c to your computer and use it in GitHub Desktop.
Save carloscastillop/9cc381971f183a9c6057c19b5c2ada4c to your computer and use it in GitHub Desktop.
Dynamic load addthis tag after ajax calls
$(document).ajaxStop(function() {
if (window.addthis) {
window.addthis = null;
window._adr = null;
window._atc = null;
window._atd = null;
window._ate = null;
window._atr = null;
window._atw = null;
}
return $.getScript("http://s7.addthis.com/js/300/addthis_widget.js#pubid=sdive");
});
@carloscastillop
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment