Insertion

Insertion provides a cross-browser solution to the dynamic insertion of HTML snippets (or plain text, obviously). Comes in four flavors: After, Before, Bottom and Top, which behave just as expected.

Moduleindex

After

new Insertion.After(element, html)

Inserts the html into the page as the next sibling of element.

Before

new Insertion.Before(element, html)

Inserts the html into the page as the previous sibling of element.

Bottom

new Insertion.Bottom(element, html)

Inserts the html into the page as the last child of element.

Top

new Insertion.Top(element, html)

Inserts the html into the page as the first child of element.

Prototype API 1.5.0 - prototypejs.org