I have an existing project that is built using GWT. We have a requirement to share the content available on this site on majority of social sites available and JQuery addthis plugin seems to do a great job in this.
Is there a wrapper available for this to be used in GWT ?
It’s actually very easy to invoke any existing JS library. As GWT programmer your horizons will broaden once you become proficient at this and it’s actually very easy as I will demonstrate.
Add the jQuery and AddThis plugin source to the DOM. For example:
Somewhere in your application you will need to create a Anchor and assign it the class name addthis, whether you do it programically, with a uibinder template or plain old html.
Now somewhere in you application you need to invoke the addthis plugin. Here are 2 example functions you could use:
Somewhere you make the call:
Congradulations! You can now hook into a world of existing JS API 🙂