atts

Attributes module

npm install atts
6 downloads in the last week
10 downloads in the last month

atts

DOM attributes module

API (0.0)

  • atts.attr(element, name?, value?) Get or set attributes.
  • atts.removeAttr(element, names) Remove attributes.
  • atts.toggleAttr(element, name, state?) ⇒ Toggle an attribute's presence and return boolean state.
  • atts.hasAttr(name, element|tagName) Test if element supports an attribute.
  • atts.hasAttr(element, name) ⇒ Test if an attribute is present on element.
  • atts.anyAttr(element, fn?, scope?) Count or iterate element's attributes.

License: MIT

Copyright (C) 2013 by Ryan Van Etten

npm loves you