When I click on any button, I want to add a class to it. How can I do this?
Html file:
...
<button data-action="btn#addClass">btn 1</button>
...
<button data-action="btn#addClass">btn 2</button>
...
<button data-action="btn#addClass">btn 3</button>
...
Now how can I create my addClass()
that when click on each, add class btnNewClass
.