I would like to add a class to an element when I click on the button.
- Define a variable and assign a value, say 0
- Add the class to then element using dynamic attributes conditionally on variable value being another value, say 1
- In dynamic events of the button, toggle the variable value to 1 which will activate the class
2 Likes
2 Likes
thanks, all done!