List of usage examples for com.google.gwt.query.client.css CSS BACKGROUND_COLOR
BackgroundColorProperty BACKGROUND_COLOR
To view the source code for com.google.gwt.query.client.css CSS BACKGROUND_COLOR.
Click Source Link
This property sets the background color of an element, either a color value or the keyword 'transparent', to make the underlying colors shine through.
From source file:gwtquery.samples.client.AnimationsSample.java
License:Apache License
private void doColorAnimation() { $(".foo")/*from w w w. j a v a 2 s . c o m*/ .queue("colorQueue", lazy().css(CSS.BACKGROUND_COLOR.with(RGBColor.RED)).dequeue("colorQueue").done()) .delay(500, "colorQueue") .queue("colorQueue", lazy().css(CSS.BACKGROUND_COLOR.with(RGBColor.BLACK)).dequeue("colorQueue").done()) .delay(500, "colorQueue").queue("colorQueue", new Function() { @Override public void f() { doColorAnimation(); $(".foo").dequeue("colorQueue"); } @Override public void cancel(Element e) { $(".foo").clearQueue().stop(); } }); }
From source file:gwtquery.samples.client.effects.ColorEffectsSample.java
License:Apache License
public void onModuleLoad() { $("#shoot").click(new Function() { public void f() { $("body").animate("backgroundColor: 'red'", 400).delay(1000).animate("backgroundColor: 'white'", 2000);/* w w w. j av a2 s . c om*/ } }); $("#startAnim2").click(new Function() { public void f() { $(".bar").animate("backgroundColor: 'yellow'", 1000).delay(200) .animate("borderColor: '#ff0000'", 1000).delay(200) .animate("color:'rgb(255, 255, 255)'", 1000); } }); $("#resetAnim2").click(new Function() { public void f() { $(".bar").css(CSS.BACKGROUND_COLOR.with(null), CSS.BORDER_COLOR.with(null), CSS.COLOR.with(null)); } }); }