After :: Insertion

new Insertion.After(element, html)

 

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

 

Example

 

Original HTML

<div>

    <p id="animal_vegetable_mineral">In short, in all things vegetable, animal, and mineral...</p>

</div>

 

Javascript

new Insertion.After('animal_vegetable_mineral'"<p>I am the very model of a modern major general.</p>");

 

Resulting HTML

<div>

    <p id="animal_vegetable_mineral">In short, in all things vegetable, animal, and mineral...</p>

    <p>I am the very model of a modern major general.</p>

</div>

 


Prototype API 1.5.0 - prototypejs.org