It is also possible to create a fade effect without using jQuery. If you want to do this, simply write an animation class as follows:
public class FadeInAnimation extends Animation {
private final UIObject uiObject;
FadeInAnimation(final UIObject uiObject) {
this.uiObject = uiObject;
}
@Override
protected void onUpdate(final double progress) {
uiObject.getElement().getStyle().setOpacity(progress);
}
}
Then you can use it for any widget:
new FadeInAnimation(myWidget).run(5000);
: getStyle().setOpacity(..) IE6/7, style.filter = 'alpha(opacity=' + (value * 100) + ')';