Closed ctuxboy closed 1 year ago
hey @ctuxboy the script doesn't require npm to be used. Just load it using a CDN and add the data-*
tags in your element. for example:
<-- import it -->
<script src="https://cdn.jsdelivr.net/npm/sharer.js@latest/sharer.min.js"></script>
<-- use it, twitter example-->
<button class="button" data-sharer="twitter" data-title="Checkout Sharer.js!" data-hashtags="awesome, sharer.js" data-url="https://ellisonleao.github.io/sharer.js/">Share on Twitter</button>
hey @ctuxboy the script doesn't require npm to be used. Just load it using a CDN and add the
data-*
tags in your element. for example:<-- import it --> <script src="https://cdn.jsdelivr.net/npm/sharer.js@latest/sharer.min.js"></script> <-- use it, twitter example--> <button class="button" data-sharer="twitter" data-title="Checkout Sharer.js!" data-hashtags="awesome, sharer.js" data-url="https://ellisonleao.github.io/sharer.js/">Share on Twitter</button>
Wow! That's nice, i will try this! Thanks a lot for the fast reply :ok_hand:
i don't have npm. Is there a.way using this buttons on my website without using npm? Maybe manual with vanilla Javascript?