diff options
author | Julien Dramaix <julien.dramaix@gmail.com> | 2011-04-13 12:35:51 +0000 |
---|---|---|
committer | Julien Dramaix <julien.dramaix@gmail.com> | 2011-04-13 12:35:51 +0000 |
commit | e838df2bf41fedf55b4ed9c132d0b59b6ec0d5e1 (patch) | |
tree | 56a574a8e7f057ec03ec7c308a34204eb1ed1b0d /gwtquery-core/src | |
parent | a523c5d1c282e53d9be32b9ab3556d4d634300a8 (diff) | |
download | gwtquery-e838df2bf41fedf55b4ed9c132d0b59b6ec0d5e1.tar.gz gwtquery-e838df2bf41fedf55b4ed9c132d0b59b6ec0d5e1.zip |
add fadeToggle() shortcut method in GQuery class
Diffstat (limited to 'gwtquery-core/src')
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java | 11 | ||||
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index e946c434..76472098 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -1742,6 +1742,17 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> { }
/**
+ * Toggle the visibility of all matched elements by adjusting their opacity and
+ * firing an optional callback after completion. Only the opacity is adjusted for
+ * this animation, meaning that all of the matched elements should already
+ * have some form of height and width associated with them.
+ */
+ public Effects fadeToggle(int millisecs, Function... f) {
+ return as(Effects).fadeToggle(millisecs, f);
+ }
+
+
+ /**
* Removes all elements from the set of matched elements that do not match the
* specified function. The function is called with a context equal to the
* current element. If the function returns false, then the element is removed
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java index a499cff9..db127353 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java @@ -926,6 +926,14 @@ public interface LazyGQuery<T> extends LazyBase<T>{ LazyGQuery<T> fadeOut(int millisecs, Function... f); /** + * Toggle the visibility of all matched elements by adjusting their opacity and + * firing an optional callback after completion. Only the opacity is adjusted for + * this animation, meaning that all of the matched elements should already + * have some form of height and width associated with them. + */ + Effects fadeToggle(int millisecs, Function... f); + + /** * Removes all elements from the set of matched elements that do not match the * specified function. The function is called with a context equal to the * current element. If the function returns false, then the element is removed |