Skip to content
Snippets Groups Projects
Commit 511885dd authored by Adrian Lang's avatar Adrian Lang
Browse files

Add missing callback param to dw_toggle

parent cb42e5f1
No related branches found
No related tags found
No related merge requests found
/*jslint sloppy: true */
/*global jQuery, LANG, document, alert */
/** /**
* Automatic behaviours * Automatic behaviours
* *
...@@ -170,13 +167,13 @@ jQuery.fn.dw_show = function(fn) { ...@@ -170,13 +167,13 @@ jQuery.fn.dw_show = function(fn) {
* *
* @param bool the current state of the element (optional) * @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() { return this.each(function() {
var $this = jQuery(this); var $this = jQuery(this);
if (typeof bool === 'undefined') { if (typeof bool === 'undefined') {
bool = $this.is(':hidden'); bool = $this.is(':hidden');
} }
$this[bool ? "dw_show" : "dw_hide" ](); $this[bool ? "dw_show" : "dw_hide" ](fn);
}); });
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment