After
deprecated

new Insertion.After(element, html)

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

As of Prototype 1.6, the complete Insertion class has been deprecated in favor of Element#insert.

Note that if the inserted HTML contains any <script> tag, these will be automatically evaluated after the insertion (Insertion.After internally calls String#evalScripts).

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>