From 20e3e8ebefec296327d39fb572b06d60c151c867 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Thu, 18 Aug 2011 11:36:18 +0200
Subject: [PATCH] added some function comments

---
 lib/scripts/behaviour.js | 21 +++++++++++++++++++--
 1 file 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);
-- 
GitLab