Login Register

dndItem

How to access data in items in a dnd container?

My dojo.dnd.Source cart has items in it. Each item has data associated with it. We know this because the creator can access data.name, data.price, etc.

When a new item is dropped onto cart, I want to update a "Your total is" display, by adding up data.price of all the items in the cart.

But cart.getAllNodes() returns an array of HTMLDivElement and the data isn't accessible.

How do I access the data in each item in a dojo.dnd.Source?

Syndicate content