jQuery - append() / preprend()

The append() method inserts specified content at the end of the selected elements.

To insert content at the beginning of the selected elements, use the prepend() method.

http://www.w3schools.com/jquery/html_append.asp

 

Hello

  1. List item 1
  2. List item 2
  3. List item 3

        $("#DemoButton").click(function ()
        {
        $("#demo-header").append(" World.");
        $("#list-items").append("<li>List Item 4</li>");
        $("#list-items").prepend("<li>List Item 0</li>");
        });