Example usage for com.google.gwt.query.client.css CSS WIDTH

List of usage examples for com.google.gwt.query.client.css CSS WIDTH

Introduction

In this page you can find the example usage for com.google.gwt.query.client.css CSS WIDTH.

Prototype

WidthProperty WIDTH

To view the source code for com.google.gwt.query.client.css CSS WIDTH.

Click Source Link

Document

This property specifies the content width of boxes generated by block-level and replaced elements.

Usage

From source file:gwtquery.samples.client.HomePageSample.java

License:Apache License

public void onModuleLoad() {
    //Hide the text and set the width and append an h1 element
    $("#text").hide().css(CSS.WIDTH.with(Length.px(400))).prepend("<h1>GwtQuery Rocks !</h1>");

    //add a click handler on the button
    $("button").click(new Function() {

        public void f() {
            //display the text with effects and animate its background color
            $("#text").as(Effects).clipDown(1000).animate("backgroundColor: 'yellow'", 1000).delay(1000)
                    .animate("backgroundColor: '#fff'", 1500);
        }/*w  ww  .j av a  2  s. c o  m*/

    });
}