Sharing Customization
Multiple - Customize
Use the following code as a template for customizing multiple share instances using AddToAny's JavaScript API.
Using data attributes
Data attributes provide the best way to set multiple AddToAny instances. Using this method, AddToAny's JavaScript only needs to be referenced one time and can be placed nearly anywhere on the page.
<div>Share Page 1:</div> <div class="a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="http://www.example.com/page_1.html" data-a2a-title="Example Page 1"> <a class="a2a_button_facebook"></a> <a class="a2a_button_mastodon"></a> <a class="a2a_dd" href="https://www.addtoany.com/share"></a> </div> <div>Share Page 2:</div> <div class="a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="http://www.example.com/page_2.html" data-a2a-title="Example Page 2"> <a class="a2a_button_facebook"></a> <a class="a2a_button_mastodon"></a> <a class="a2a_dd" href="https://www.addtoany.com/share"></a> </div> <div>Share Page 3:</div> <div class="a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="http://www.example.com/page_3.html" data-a2a-title="Example Page 3"> <a class="a2a_button_facebook"></a> <a class="a2a_button_mastodon"></a> <a class="a2a_dd" href="https://www.addtoany.com/share"></a> </div> <script defer src="https://static.addtoany.com/menu/page.js"></script>