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
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
After adding the new content to the dom, call
Article another another
I was facing the same problem with sharethis and Ajax pagination. The buttons was not showing after posts loaded by Ajax so I've searched and found this. I've just added the function
stButtons.locateElements();
on Ajaxsuccess:
something like
success:
stButtons.locateElements();
Hope this will be helpful for someone like me.
Thanks Ibnul
For the new API following solution worked for me
Add this code after loading ajax content.
do this:
and config your buttons with javascript.
Updated 09/2017 Answer
The stButtons object doesn't exist anymore, now you can use
To reinitialize the buttons
This solution will also work for NodeJS based frameworks, like Meteor.
is needed in the rendered callback of a template, to ensure that the shareThis buttons will appear on a page redirect.