Click to add elements.
Hit any key to remove an element.
Appended elements appear in red.
Note: We begin with two <p>
tags and this data array: [0, 1, 2]. So the
first time through, the '2' element is not initially bound to a <p>
tag.
The first click will add a '3' element and append <p>
's for all the
unbound elements. In this case, two new <p>
tags will be added (for the '2'
element and the new '3' element).
For a simpler example without animated transitions, see: Yet another example of append/update/exit