Closed dtslvr closed 4 years ago
Hi, thank you for the idea! I have created shareon with one feature in mind — creating customizable buttons that are being populated with links. You can easily implement this behaviour yourself using onclick
attribute or adding a click
event listener:
<div class="shareon">
<a class="facebook" onclick="userClicked('facebook')"></a>
<a class="twitter" id="twitterBtn"></a>
</div>
<script>
function userClicked(network) {
console.log(network);
}
document
.getElementById('twitterBtn')
.addEventListener('click', function() { console.log('twitter'); });
</script>
Thanks a lot for the hint @NickKaramoff!
Hello guys
It would be nice to get notified when a share button has been clicked (with the name of the social network).
Keep up the great work!