1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-05-12 08:00:12 +00:00
2 Dom.Add
boxgaming edited this page 2023-09-25 13:42:30 -05:00

Adds an existing html element to a new parent element.

Syntax

Dom.Add element [, parent] [, insertBefore]

Parameters

  • The element parameter indicates which element should be added.
    It can be either the object returned from a previous Dom.Create method or Dom.Get method or the String id of the element.
  • The option parent parameter can be either the object returned from a previous Dom.Create method or Dom.Get method or the String id of the parent element. The created element will be appended to the end of the current contents of the parent element (unless the insertBefore parameter is specified). If not specified the element will be added to the default container element.
  • The optional insertBefore parameter can be either the object returned from a previous Dom.Create or Dom.Get method or the String id of a sibling html element. The newly created element will be inserted into the specified parent container element immediately before the indicated insertBefore element.

See Also

Dom.Container Dom.Create Dom.Event Dom.Get Dom.GetImage Dom.Remove