diff options
author | Adrian Lang <lang@cosmocode.de> | 2011-08-22 15:34:47 +0200 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2011-08-22 15:34:47 +0200 |
commit | 511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892 (patch) | |
tree | 58be1674b34554b6e0abaeecc9bbc75eb9fe72e6 /lib/scripts/behaviour.js | |
parent | cb42e5f1de77ce65441002c0b0b94d5855cab1f0 (diff) | |
download | dokuwiki-511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892.tar.gz dokuwiki-511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892.zip |
Add missing callback param to dw_toggle
Diffstat (limited to 'lib/scripts/behaviour.js')
-rw-r--r-- | lib/scripts/behaviour.js | 7 |
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); }); }; |