nodelist-js.mustache revision bb82d389f8b12cd4366603113b2fc397561c0b9d
<script>
YUI().use('node', function(Y){
var boxes = Y.all('.box-row li');
var handleBoxClick = function(e) {
// boxes is a NodeList
boxes.setContent('neener');
boxes.setStyle('backgroundColor', '#F4E6B8');
// e.currentTarget === .box-row li, just the one that was clicked
e.currentTarget.setContent('ouch!');
e.currentTarget.setStyle('backgroundColor', '#C4DAED');
};
Y.one('.box-row').delegate('click', handleBoxClick, 'li');
});
</script>