jQuery建议ready
在进行任何 DOM 操作之前等待文档事件。在flight.js组件中,this.after('initialize')
似乎在该事件触发之前被调用。
是否有必要像这样在飞行组件中等待它?
this.after('initialize', function () {
// Is this necessary?
$(document).ready(function () {
...
});
// Or this, the flight way?
this.on(document, 'ready', function () {
...
});
});
谢谢