<button class="save">Save 1</button>
<button class="save">Save 2</button>
<button class="save">Save 3</button>
<script>
let saveBtn = document.getElementsByClassName('save');
Array.from(save).forEach(function (el) {
el.addEventListener('click', handler)
});
function handler() {
console.log('Clicked');
}
</script>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter