Represents attributes of DOM element.
To access attributes collection of the element use its attributes property: element.attributes
Executes body of the loop for attributes of the element. Value of name variable is text - name of the attribute.
Returns string - name of the attribute at index position. Index is zero-based integer value here.
Clears collection of attributes of the element.
Removes attribute from the collection of attributes. Attr here is either string (name of attribute) or integer (zero-based index of the attribute).
Returns true if attr exists in the collection of attributes. attr here is either string (name of attribute) or integer (zero-based index of the attribute).
Adds class name[s] to the class attribute of the element.
Removes class name[s] from the class attribute of the element.
Adds or removes class. If on is provided then adds the class if it is true and removes it if on is false. If no on provided removes class if it is there, or adds it otherwise.
Returns true if the element has className defined.