D
D
DeveloperV2019-12-23 17:28:29
MODX
DeveloperV, 2019-12-23 17:28:29

How to implement a like counter?

5e00cec69195e767618856.png
How to make the number 96 increase by +1 when you click on the icon, and if you click again, it would become 96.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sanes, 2019-02-18
@Sanes

&displayStart=`1`

A
Andrew, 2019-12-23
@developerV

https://jsfiddle.net/kickerock/bgynkusc/6/

A
Alexey, 2019-12-23
@Rushelex

const button = document.querySelector('.button');
let count;

button.addEventListener('click', () => {
  count =+ 1;
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question