Having a firm grasp on the previous three recipes that are building blocks for what is happening in this example keeps us on track.
There is very little to removing the cart items. Our most difficult part is adding a widget with which our users will remove the products. The PNG format image with transparency is supported in all major browsers and adds a flair of professionalism to the cart.
... // change the Inventory level to a count of that product var cloned_html = $(newid).get('html'); cloned_html = cloned_html.replace( /Inventory/m,'Quantity'); $(newid).set('html',cloned_html); // add a return to shelf X at top right of each contaier new Element('a',{ class: 'back_to_shelf' }).addEvent('click',function() { // remove the hidden, client-side storage, INPUT vars $$('.'+dragid).destroy(); // remove the picture from the cart this.getParent().destroy(); }).inject(newid,'top'); // client side storage! if ($$...