Quantcast
Viewing all articles
Browse latest Browse all 3491

Re : can.Component external events

"selected" (and "id") actually contains a value that is shared between all the playing components.

As you update selected attribute in node-list (using attr('selected', newVal) it triggers change event. This event is handle by tow-way binding magic that updates selected value in parent-container, this change event will then update id value in note-editor. Try to implement it and you will see. 
You should not think about triggerig some custom events or accessing/manipulating DOM. think in terms of changing state/data layer.

First look carefully at this code http://jsfiddle.net/xKc3H/258/ and then try to implement your problem.

If you create a fiddle that you have trouble with I will look at it and give my comments.

Viewing all articles
Browse latest Browse all 3491

Trending Articles