YUI.Use(new String[]{"button", "imageloader"}, new YUICallback() {
@Override
public void ready(final YuiContext Y) {
Node trigger = parent.appendChild("<p id=\"trigger1\">clickme will trigger or wait 5s</p>");
Node img = parent.appendChild("<p id=\"delayedImg\">this is a<br/>delayed img</p>");
ImgLoadGroup myFirstGroup = Y.newImgLoadGroup(ImgLoadGroupConfig.create().timeLimit(5));
myFirstGroup.registerImage(ImgLoadImgObjConfig.create().
domId("delayedImg").
bgUrl("http://code.google.com/p/yuigwt/logo"));
myFirstGroup.addTrigger("#trigger1", "click");
}
});
}