I have several counters, how can I store all values in the store? And is this even possible in this example?
I created a code snippet here:
document.addEventListener('click', function(event) {
if (event.target.dataset.counter != undefined) {
event.target.value++;
}
});
Counter: <input type="button" value="1" data-counter>
Another counter: <input type="button" value="2" data-counter>
And another counter: <input type="button" value="2" data-counter>