Toggle boolean attributes in DOM elements

1
2
function toggleAttrs(attributes, elements) {
if (Array.isArray(attributes)) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Toggle boolean attribute in HTML elements such as "disabled". Currently working on a version that replaces the forEach approach with simple FOR loops in order to be able to pass live node arrays that can't be iterated over with forEach or any other functional programming array method. ─ This snippet is a piece of a JavaScript library I'm working on, you can see it here: https://github.com/luishendrix92/WindowbirdJS

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.