$("button").click(new Function(){
public void f() {
+ //display the text with effects and animate its background color
$("#text").as(Effects)
- .clipDown()
- .animate("backgroundColor: 'yellow'", 500)
+ .clipDown(1000)
+ .animate("backgroundColor: 'yellow'", 1000)
.delay(1000)
.animate("backgroundColor: '#fff'", 1500);
}
<head>
<title>GQuery</title>
<script language="javascript" src="HomePageSample.nocache.js"></script>
-<style type="text/css">
-.reset {
- float: left;
-}
-
-.foo {
- border: 1px solid black;
-}
</style>
</head>
<body>
-<p>Java Code :</p>
-<pre>
- 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() {
- $("#text").as(Effects)
- .clipDown()
- .animate("backgroundColor: 'yellow'", 500)
- .delay(1000)
- .animate("backgroundColor: '#fff'", 1500);
- }
-
- });
- }
-</pre>
<button>Click Me</button>
<div id="text">Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Maecenas ac ultricies lorem. Integer erat nibh, semper eget