(append! parent child)Append child to parent
Append `child` to `parent`
(as-str s)Coerces strings and keywords to strings, while preserving namespace of namespaced keywords
Coerces strings and keywords to strings, while preserving namespace of namespaced keywords
(insert-before! elem other)Insert elem before other, other must have a parent
Insert `elem` before `other`, `other` must have a parent
(remove! elem)(remove! p elem)Remove elem from parent, return parent
Remove `elem` from `parent`, return `parent`
(set-attr! elem k)(set-attr! elem k v)(set-attr! elem k v & kvs)Sets dom attributes on and returns elem.
Attributes without values will be set to their name:
(set-attr! elem :disabled)
With values, the function takes variadic kv pairs:
(set-attr! elem :id "some-id"
:name "some-name")
Sets dom attributes on and returns `elem`.
Attributes without values will be set to their name:
(set-attr! elem :disabled)
With values, the function takes variadic kv pairs:
(set-attr! elem :id "some-id"
:name "some-name")(set-html! elem html)Set the innerHTML of elem to html
Set the innerHTML of `elem` to `html`
(set-style! elem & kvs)Set the style of elem using key-value pairs:
(set-style! elem :display "block" :color "red")
Set the style of `elem` using key-value pairs: (set-style! elem :display "block" :color "red")
(set-text! elem text)Set the textContent of elem to text, fall back to innerText
Set the textContent of `elem` to `text`, fall back to innerText
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |