diff --git a/source/Ox.UI/js/Core/Element.js b/source/Ox.UI/js/Core/Element.js index b1b96613..1da1790c 100644 --- a/source/Ox.UI/js/Core/Element.js +++ b/source/Ox.UI/js/Core/Element.js @@ -420,25 +420,27 @@ Ox.Element = function(options, self) { /*@ setElement set $element - ($element) -> null + ($element) -> This element @*/ that.setElement = function($element) { $element.addClass('OxElement').data({oxid: that.oxid}); that.$element.replaceWith($element); that.$element = $element; that[0] = that.$element[0]; + return that; }; /*@ - toggleOption toggle option - () -> object + toggleOption Toggle boolean option(s) + (key[, key[, ...]]) -> This element @*/ that.toggleOption = function() { var options = {}; - Ox.makeArray(arguments[0]).forEach(function(key) { + Ox.toArray(arguments).forEach(function(key) { options[key] == !self.options[key]; }); that.options(options); + return that; }; /*@