From 511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 22 Aug 2011 15:34:47 +0200 Subject: Add missing callback param to dw_toggle --- lib/scripts/behaviour.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/scripts/behaviour.js') 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); }); }; -- cgit v1.2.3