1.0.9 • Published 8 years ago

domanip v1.0.9

Weekly downloads
11
License
MIT
Repository
github
Last release
8 years ago

Functions

addClass(c, e) ⇒ boolean

Kind: global function
Summary: add a CSS class to an HTML element
Returns: boolean - - whether the className has been added or not (returns false if className was already present)

ascendUntil(e, c) ⇒ object | undefined

Kind: global function
Summary: traverses the DOM by traveling up parentNodes until the provided condition returns true
Returns: object | undefined - node where condition is true, otherwise undefined

descendUntil(e, c) ⇒ object | undefined

Kind: global function
Summary: traverses the DOM by traveling down childNodes, iteratively, until the provided condition returns true
Returns: object | undefined - node where condition is true, otherwise undefined

removeClass(c, e) ⇒ boolean

Kind: global function
Summary: remove a CSS class from an HTMl element
Returns: boolean - - whether the className has been removed or not (returns false if className wasn't present)

toggleClass(c1, e, c2) ⇒ boolean

Kind: global function
Summary: Toggles the provided className based on following conditions: if className present on element, replace it with second provided className, otherwise remove it. if className not present on element, add it. if second className present on element, replace it with first className.
Returns: boolean - - success of operation

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago