diff options
-rw-r--r-- | samples/src/main/java/gwtquery/samples/client/HomePageSample.java | 5 | ||||
-rw-r--r-- | samples/src/main/java/gwtquery/samples/public/HomePageSample.html | 28 |
2 files changed, 3 insertions, 30 deletions
diff --git a/samples/src/main/java/gwtquery/samples/client/HomePageSample.java b/samples/src/main/java/gwtquery/samples/client/HomePageSample.java index a66f057b..ca845aff 100644 --- a/samples/src/main/java/gwtquery/samples/client/HomePageSample.java +++ b/samples/src/main/java/gwtquery/samples/client/HomePageSample.java @@ -34,9 +34,10 @@ public class HomePageSample implements EntryPoint { $("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); } diff --git a/samples/src/main/java/gwtquery/samples/public/HomePageSample.html b/samples/src/main/java/gwtquery/samples/public/HomePageSample.html index a3dcfdec..a2a59266 100644 --- a/samples/src/main/java/gwtquery/samples/public/HomePageSample.html +++ b/samples/src/main/java/gwtquery/samples/public/HomePageSample.html @@ -3,37 +3,9 @@ <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 |