FunAddThe FunAdd takes the element and the new element to be inserted
Method | Description | parameters |
---|---|---|
append() | Adds the element to the end of it's parent | `append(selector , child)` |
prepend() | Adds the element atthe beginning of it's parent | `prepend(selector , child)` |
#
Append
The append() method is used to add one or more elements or text nodes as the last child of an existing element.
It allows you to append content to an element within the DOM
React / Next.js Show Source Code
Append Element
#
Prepend
The prepend() method is used to add one or more elements or text nodes as the first child of an existing element within the DOM (Document Object Model) structure. It allows you to prepend content to an element. The prepend() method is used to add one or more elements or text nodes as the first child of an existing element within the DOM (Document Object Model) structure.
It allows you to prepend content to an element.
React / Next.js Show Source Code
Prepend an element