Skip to content

addClass/removeClass change the property not the attribute #312

Closed
@dmethvin

Description

@dmethvin

Clarify that these two methods manipulate the property and not the attribute. In HTML DOM docs the browser echoes the className property value back into the class attribute. Two implications:

  • The browser may not remove the class attribute when the last class name is removed, it may only be set to an empty string.
  • The addClass/removeClass methods only work for documents with HTML DOM semantics (e.g., not pure XML documents).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions