diff options
author | Julien Dramaix <julien.dramaix@gmail.com> | 2011-04-29 11:58:55 +0000 |
---|---|---|
committer | Julien Dramaix <julien.dramaix@gmail.com> | 2011-04-29 11:58:55 +0000 |
commit | 639c6d527461b4a9b8b948c470197849201f2a03 (patch) | |
tree | dadb26cae9f84ace8d03af3112f2b2d7a1fa24f9 /samples | |
parent | 5c33bc39f71f58e58be184f482d74477e2eeb221 (diff) | |
download | gwtquery-639c6d527461b4a9b8b948c470197849201f2a03.tar.gz gwtquery-639c6d527461b4a9b8b948c470197849201f2a03.zip |
finalize home page sample
Diffstat (limited to 'samples')
-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 |