Click an item in the store to send it to the shopping cart.

Click an item in the cart to remove it.

{{>store-css}} {{>store-html}} {{>store-js}}

This example is built upon the DOM Method example in this `node` module. It just has more CSS and some images.

Setting up the HTML

First we need some HTML for a store.

``` ```

Then we need some HTML for a shopping cart.

``` ```

Using DOM Methods

Most common DOM methods are available via Node instances. These can be used to add, remove, and retrieve other nodes.

``` clone = item.cloneNode(true); list2.append(clone); item.remove(); // sugar for item.get('parentNode').removeChild(item); ```

The JavaScript

The script for this example is very similar to the DOM Method example

``` {{>store-js}} ```

The CSS

Just like the DOM Method example in this `node` module, when an item on the left (store) is clicked, an identical clone of that item is added to the list on the right (cart). The only thing that makes the cart items look different from the store items is the CSS.

``` {{>store-css}} ```

Complete Example Source

``` {{>store-css}} {{>store-html}} {{>store-js}} ```