Static
addTarget element
Class name(s) to add
Static
animateAnimate element using CSS transitions
Target element
CSS properties to animate
Animation duration in milliseconds
Easing function
Promise that resolves when animation completes
Static
attrGet or set element attributes
Target element
Attribute name or attributes object
Attribute value (when name is string)
Attribute value (when getting)
Get or set element attributes
Target element
Attribute name or attributes object
Attribute value (when getting)
Get or set element attributes
Target element
Attribute name or attributes object
Attribute value (when getting)
Static
closestFind closest ancestor element matching selector
Starting element
CSS selector
Matching ancestor element
Static
createCreate DOM element with attributes and content
HTML tag name
Element attributes
Element content
Created element
Static
dataGet or set element data attributes
Target element
Data key
Data value (when setting)
Data value (when getting)
Get or set element data attributes
Target element
Data key
Data value (when getting)
Static
delegateDelegate event to selector inside a parent element
Parent element
Target selector
Event type
Event handler
Static
emptyEmpty element's content
Element to empty
Static
fadeFade in element
Target element
Animation duration in milliseconds
Promise that resolves when animation completes
Static
fadeFade out element
Target element
Animation duration in milliseconds
Promise that resolves when animation completes
Static
getGet DOM element from selector or element
Element or selector
DOM element or null
Static
getGet all matching DOM elements
CSS selector
Context element (default: document)
List of matching elements
Static
getGet next sibling element
Target element
Optional selector to match
Next sibling element
Static
getGet element's offset position
Target element
Position object with top, left, width, height
Static
getGet element's position relative to viewport
Target element
Position object with top, left, width, height
Static
getGet previous sibling element
Target element
Optional selector to match
Previous sibling element
Static
getGet all siblings of an element
Target element
Optional selector to filter siblings
Array of sibling elements
Static
getGet element's computed style property
Target element
CSS property name
Computed style value
Static
hasCheck if element has CSS class
Target element
Class name to check
True if element has class
Static
insertInsert element after target element
Element to insert
Target element
Static
insertInsert element before target element
Element to insert
Target element
Static
isCheck if element is visible in viewport
Target element
True if element is visible
Static
matchesCheck if element matches selector
Element to check
CSS selector
True if element matches selector
Static
observeDebounced resize observer
Element to observe
Callback function
Debounce delay
ResizeObserver instance
Static
offRemove event listener
Target element
Event type
Event handler
Static
onAdd event listener
Target element
Event type
Event handler
Static
removeRemove element from DOM
Element to remove
Static
removeRemove attribute from element
Target element
Attribute name
Static
removeRemove CSS class from element
Target element
Class name(s) to remove
Static
scrollScroll element into view
Target element
Scroll options
Static
setSet element content
Target element
Content to set
Static
setSet element's style properties
Target element
Style properties object
Static
slideSlide down element
Target element
Animation duration in milliseconds
Promise that resolves when animation completes
Static
slideSlide up element
Target element
Animation duration in milliseconds
Promise that resolves when animation completes
Static
toggleToggle CSS class on element
Target element
Class name to toggle
Optional
force: booleanForce add/remove
True if class is present after toggle
Static
toggleToggle visibility of an element
Target element
Show if true, hide if false
Add CSS class to element