addthis widget for print page is not working for the first page load

246 views Asked by At

I am using addthis widget from addthis.com.
I am using a script tag inside head tag:

        <script
            type="text/javascript"
            src="//s7.addthis.com/js/300/addthis_widget.js#pubid=your_pubid"
            async="async"
        ></script>

Now I just need to add a html with className :

<div className="addthis_inline_share_toolbox_3xd0" />

to get a Print and More options on the page, like given image below :

enter image description here

But the problem is, these two options are not showing for the first time page visit. If I do refresh the page, then these two options will show.
I am not able to find what the issue here ?

Note:

I have tried to move the script tag at the last of the body tag. But not working.
I have tried to use the defer option instead of async in script tag. But not working.

1

There are 1 answers

0
Jordy On

Steps to debug this issue:

  1. Make sure your code looks like this :
<html>

<head></head>

<body>

    <!-- Go to www.addthis.com/dashboard to customize your tools -->
    <div class="addthis_inline_share_toolbox"></div>

    <script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=your_pubid"></script>
</body>

</html>
  1. Customize addthis buttons at Addthis Dashboard > Tools. Make sure Print and More button exist like this :

example