javascript - How to update the sharing url inside onclick event for the AddThis button? -
I am using to present a group of social media icons.
What I am trying to achieve is only to update the sharing URL, when a user clicks on any social media icon - this is important because I do not already update the URL I have tried the jquery click function to update the URL.
$ ("addthis_sharing_toolbox"). Click (function () {theUrl = window.location.origin + currentStatus; addthis.update ('share', 'url', theUrl);});
I have also tried to add a listener
addthis.addEventListener ('addthis.menu.share', addthisShare);
The problem with all of these is that they are running after the adithis click event, so the sharing URL has not been updated.
Any ideas to be resolved will be appreciated.
Comments
Post a Comment