Question

I'm using fancybox to display images and i would like to show social network buttons under the image. However i am having some issues with addthis, the buttons aren't showing, they are just plain links even if i render addthis again.

Javascript:

 beforeShow: function () {
                        if (this.title) {
                            // New line

                            this.title += '<br />';


                            //addThis
                            this.title += '<div id="toolbox" class="addthis_toolbox addthis_default_style addthis_32x32_style"></div>';


                        }
                    }, afterShow: function () {

                        var tbx = document.getElementById("toolbox"),
                            svcs = {email: 'Email', print: 'Print', facebook: 'Facebook', expanded: 'More'};

                        for (var s in svcs) {
                            tbx.innerHTML += '<a class="addthis_button_'+s+'">'+svcs[s]+'</a>';
                        }



                        //addthis.init();
                        //addthis.toolbox('#toolbox');
                        //addthis.button('.addthis_button');
                        addthis.toolbox("#toolbox");
//addthis.button(".addthis_button_email");

    },

Result: HTML Outcome of addthis

Thanks in advance!

Was it helpful?

Solution

Switching to sharethis fixed my problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top