Core Docs | Additional Modules Docs
@Description: Appends another DOM element to the element as a child
@File: sb.js
@Type: function
@Param: Element, String el Another DOM element reference or a string that can be passed through sb.$ to return a DOM node.
@Example:myElement.append(myOtherElement);
@Description: Appends the element after another DOM element as a sibling
@File: sb.js
@Type: function
@Param: Element, String el Another DOM element reference or a string that can be passed through sb.$ to return a DOM node.
@Example://appends myElement to the parent of "#myDiv" as a sibling of "#myDiv" directly after "#myDiv"
myElement.appendAfter('#myDiv');
@Description: Appends the element before another DOM element as a sibling
@File: sb.js
@Type: function
@Param: Element, String el Another DOM element reference or a string that can be passed through sb.$ to return a DOM node.
@Example://appends myElement to the parent of "#myDiv" as a sibling of "#myDiv" directly before "#myDiv"
myElement.appendBefore('#myDiv');
@Description: Appends the element to another DOM element as a child
@File: sb.js
@Type: function
@Param: Element, String el Another DOM element reference or a string that can be passed through sb.$ to return a DOM node.
@Return: Element A refernce to the appended node
@Example://appends myElement to the page body
myElement.appendTo('body');
//appends myElement to a div with the ID "myDiv"
myElement.appendTo('#myDiv');
@Description: Appends the element to the top DOM element as a child
@File: sb.js
@Type: function
@Param: Element, String el Another DOM element reference or a string that can be passed through sb.$ to return a DOM node.
@Return: Element A refernce to the appended node
@Example://appends myElement to the page body
myElement.appendToTop('body');
//appends myElement to a div with the ID "myDiv"
myElement.appendToTop('#myDiv');