Be the first user to complete this post

  • 0
Add to List

Reinitialize addthis after loading ajax content

If you are using the AddThis share buttons, you might have noticed that once you initialize it on page load, it does not really work for content that is loaded via ajax after the fact. i.e. AddThis is unaware of fresly loaded content. The fix for this is pretty simple. Just ask AddThis to refresh as follows, and it will automatically regenerate the correct share links for newly loaded content

addthis.layers.refresh();



Also Read:

  1. Use node in es6 syntax with babel transpiling
  2. Dynamic module loading with require
  3. Sublime Text plugins to boost your productivity
  4. Chromium flag to by pass the popup to grant media permissions in webRTC
  5. Disable eslint no-unused-vars warning on global functions
  6. webpack with babel6 and react
  7. Writing multiline sql queries in javascript using knex