diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index d7c3d2975d8fe4c785c210502078e629334160fc..afb210840af10d8352d68082451de04587a74d74 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); }); };