fix toggleOption method
This commit is contained in:
parent
4434e063bc
commit
9b6b6fd356
1 changed files with 6 additions and 4 deletions
|
@ -420,25 +420,27 @@ Ox.Element = function(options, self) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
setElement <f> set $element
|
setElement <f> set $element
|
||||||
($element) -> null
|
($element) -> <o> This element
|
||||||
@*/
|
@*/
|
||||||
that.setElement = function($element) {
|
that.setElement = function($element) {
|
||||||
$element.addClass('OxElement').data({oxid: that.oxid});
|
$element.addClass('OxElement').data({oxid: that.oxid});
|
||||||
that.$element.replaceWith($element);
|
that.$element.replaceWith($element);
|
||||||
that.$element = $element;
|
that.$element = $element;
|
||||||
that[0] = that.$element[0];
|
that[0] = that.$element[0];
|
||||||
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
toggleOption <f> toggle option
|
toggleOption <f> Toggle boolean option(s)
|
||||||
() -> <o> object
|
(key[, key[, ...]]) -> <o> This element
|
||||||
@*/
|
@*/
|
||||||
that.toggleOption = function() {
|
that.toggleOption = function() {
|
||||||
var options = {};
|
var options = {};
|
||||||
Ox.makeArray(arguments[0]).forEach(function(key) {
|
Ox.toArray(arguments).forEach(function(key) {
|
||||||
options[key] == !self.options[key];
|
options[key] == !self.options[key];
|
||||||
});
|
});
|
||||||
that.options(options);
|
that.options(options);
|
||||||
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
|
Loading…
Reference in a new issue