YUI3.2.0 的 transition 模塊,通過使用 transition:end 事件實(shí)現(xiàn)在 transition 完成后執(zhí)行其他操作。在 YUI3.3.0 中,這個事件類型已經(jīng)不被推薦,統(tǒng)一采用以下兩種方式:
第一種,直接使用回調(diào)函數(shù):
node.transition({width: 0}, function() {
//your code here...
});
第二種,通過參數(shù)配置:
node.transition({
width: 0,
on: {
start: function() {},
end: function() {}
}
});
詳細(xì)參考這篇資料:http://yuilibrary.com/projects/yui3/ticket/2529598