Creating CheckList Rows on Submit
Next, you will add a method to CheckList that will use the Row constructor to create Row instances. It will append each Row instance’s $element to the live DOM on the page.
checklist.js, add a method to
addRow. It should accept an argument called
coffeeOrder, which will be an object that contains all of the
data for a single coffee order.
In this new method, create a new Row
instance by calling the Row constructor and
passing it the
coffeeOrder object. Assign the new
instance to the variable
append the rowElement’s
$element property (which contains the DOM
subtree) to the
$element property (which is a reference to the container for ...