Sharethis button does not work on pages loaded via ajax

Pankaj picture Pankaj · Sep 22, 2010 · Viewed 13.1k times · Source

I am trying to use the sharethis button on a page which is loaded via ajax. The buttons do not show up. Please help.

Regards, Pankaj

Answer

Larry K picture Larry K · Jun 22, 2011

After adding the new content to the dom, call

stButtons.locateElements();

// or if you want to be a bit defensive about whether the lib has been
// loaded or not:
if (window.stButtons){stButtons.locateElements();} // Parse ShareThis markup

Article another another