append(elementNames, [attributes])

Each specified element is appended to each element in the original collection.

// Create a <g> 'group' element
    // Append an element
    // Append elements targeted by a CSS selector
    // Append elements in a Pablo collection
    // Append elements in a jQuery collection
    // Append elements in an array
    .append([Pablo.a(), Pablo.g()]);

If elements is an element name string and an attributes object is supplied, then new elements will be created and appended for each element in the collection. The same happens when elements is an array of element names:

    // Append single created element
    .append('line', {stroke:'black'})
    // Append multiple created elements
    .append(['line', 'circle', 'path']);

The attributes object is optional when an array of element names is passed, but required if a single element name is passed (otherwise, the single element name would be treated as a CSS selector).

If the collection contains multiple elements, each specified element gets cloned after it is first appended.

Pablo(['g', 'g'])
// the #foo element is appended to the first <g>
// then it is cloned before being appended to the second <g>
Painting is just another way of keeping a diary.
Pablo Picasso