You must attach the event listener to the AutoComplete
instance rather than the Node
. The AutoComplete
instance can be accessed via the ac
member of the Node
, and from there you can simply attach your event callback as you had before:
mynode.ac.after('select', function (e) {
getStockInfo();
});
Take a look at the YUI AutoComplete tutorial (As a Plugin section specifically) for more details.