summaryrefslogtreecommitdiff
path: root/lib/scripts/behaviour.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts/behaviour.js')
-rw-r--r--lib/scripts/behaviour.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index d7c3d2975..afb210840 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -1,6 +1,3 @@
-/*jslint sloppy: true */
-/*global jQuery, LANG, document, alert */
-
/**
* Automatic behaviours
*
@@ -170,13 +167,13 @@ jQuery.fn.dw_show = function(fn) {
*
* @param bool the current state of the element (optional)
*/
-jQuery.fn.dw_toggle = function(bool) {
+jQuery.fn.dw_toggle = function(bool, fn) {
return this.each(function() {
var $this = jQuery(this);
if (typeof bool === 'undefined') {
bool = $this.is(':hidden');
}
- $this[bool ? "dw_show" : "dw_hide" ]();
+ $this[bool ? "dw_show" : "dw_hide" ](fn);
});
};