domUtils is a utility library for DOM manipulation in JavaScript.
selector
, selectorAll
)createElement
, appendChild
, removeElement
, etc.)addClass
, removeClass
, hasClass
, toggleClass
)addEventListener
, removeEventListener
)setInnerHTML
, getInnerHTML
, setTextContent
, getTextContent
)setAttribute
, getAttribute
, removeAttribute
)setStyle
, getStyle
)hideElement
, showElement
, toggleVisibility
)cloneElement
, getParent
, getChildren
, etc.)addClasses
, removeClasses
, setStyles
)getValue
, setValue
)isVisible
, scrollIntoView
)fadeIn
, fadeOut
)```javascript const element = domUtils.selector(‘#myElement’); domUtils.addClass(element, ‘active’); domUtils.addEventListener(element, ‘click’, function() { console.log(‘Element clicked!’); });