summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2011-08-22 15:34:47 +0200
committerAdrian Lang <lang@cosmocode.de>2011-08-22 15:34:47 +0200
commit511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892 (patch)
tree58be1674b34554b6e0abaeecc9bbc75eb9fe72e6 /lib/scripts
parentcb42e5f1de77ce65441002c0b0b94d5855cab1f0 (diff)
downloadrpg-511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892.tar.gz
rpg-511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892.tar.bz2
Add missing callback param to dw_toggle
Diffstat (limited to 'lib/scripts')
-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);
});
};