I know event delegation in this form:
anItem = Y.one('ul#id');
anItem.delegate('click', aFunction, 'selector');
What event to use for applying style to each li created dynamically? I will run addClass() to each li/new li.
I tried like this:
anItem.delegate('onchange', aFunction, 'selector');
I have tried with 'change' event as well. But no success.
What elements are selected by 'selector'
? The onchange
event is only valid for INPUT
, SELECT
and TEXTAREA
elements. See the spec.