I added an attribute to a div I created, now I want to remove this attribute and replace with another once listen to a click event. How do I do that?
I tried using the remove attribute but I don't seem to understand why it's not working...
I added an attribute to a div I created, now I want to remove this attribute and replace with another once listen to a click event. How do I do that?
I tried using the remove attribute but I don't seem to understand why it's not working...
Copyright © 2021 Jogjafile Inc.
Check if below example helps you.
You can skip the else condition in script if you only need to remove the attribute on click.