give click function for multiply buttons

PHOTO EMBED

Wed Dec 15 2021 20:28:03 GMT+0000 (UTC)

Saved by @Samo_Krose #javascript

    btns = document.getElementsByClassName("saveBtn");
    for (var i = 0; i < btns.length; i++) {
        btns[i].addEventListener("click", function () {
			//Add function here
        });
    }
content_copyCOPY

worked for me

https://www.thiscodeworks.com/add-event-listener-to-multiple-buttons-with-the-same-class-javascript/5efa75c76c23bc0014be6336