summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/scripts/behaviour.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index aadf74a1c..6012e5d1d 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -112,14 +112,31 @@ var dw_behaviour = {
};
+/**
+ * Hides elements with a slide animation
+ *
+ * @param fn optional callback to run after hiding
+ * @author Adrian Lang <mail@adrianlang.de>
+ */
jQuery.fn.dw_hide = function(fn) {
return this.slideUp('fast', fn);
};
-jQuery.fn.dw_show = function() {
- return this.slideDown('fast');
+/**
+ * Unhides elements with a slide animation
+ *
+ * @param fn optional callback to run after hiding
+ * @author Adrian Lang <mail@adrianlang.de>
+ */
+jQuery.fn.dw_show = function(fn) {
+ return this.slideDown('fast', fn);
};
+/**
+ * Toggles visibility of an element using a slide element
+ *
+ * @param bool the current state of the element (optional)
+ */
jQuery.fn.dw_toggle = function(bool) {
return this.each(function() {
var $this = jQuery(this);