Vanilla JavaScript toggleAttribute
In todays article we are going to look into the JavaScript toggleAttribute() method. This method is pretty self explaining, but it can be used to toggle a boolean attribute value.
What kind of attributes? We can think about a readonly value, required...
h.daily-dev-tips.com2 min read