Insertion Atom feed
As of Prototype 1.6, the complete Insertion
class has been deprecated in favor of Element#insert
.
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.
Note that if the inserted HTML contains any <script>
tag, these will be automatically evaluated after the insertion (Insertion
internally calls String#evalScripts).
Methods
After
deprecated
new Insertion.After(element, html)
Inserts the html
into the page as the next sibling of element
.
Before
deprecated
new Insertion.Before(element, html)
Inserts the html
into the page as the previous sibling of element
.
Bottom
deprecated
new Insertion.Bottom(element, html)
Inserts the html
into the page as the last child of element
.
Top
deprecated
new Insertion.Top(element, html)
Inserts the html
into the page as the first child of element
.