add Ox..toggleClass() method
This commit is contained in:
parent
728fc69fb5
commit
d7f54bc7e4
1 changed files with 10 additions and 0 deletions
|
@ -251,6 +251,16 @@ Ox.$ = Ox.element = function(value) {
|
||||||
return this.css({display: 'block'});
|
return this.css({display: 'block'});
|
||||||
},
|
},
|
||||||
/*@
|
/*@
|
||||||
|
toggleClass <f> Toggles a class name
|
||||||
|
(className) -> <o> This element
|
||||||
|
className <s> Class name
|
||||||
|
@*/
|
||||||
|
toggleClass: function(string) {
|
||||||
|
return this[
|
||||||
|
this.hasClass(string) ? 'removeClass' : 'addClass'
|
||||||
|
](string);
|
||||||
|
},
|
||||||
|
/*@
|
||||||
trigger <f> Triggers an event
|
trigger <f> Triggers an event
|
||||||
(event) -> <o> This element
|
(event) -> <o> This element
|
||||||
@*/
|
@*/
|
||||||
|
|
Loading…
Reference in a new issue