go
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

toggle method

Adds a token if it is not present, or removes it if it is. Returns true if the token is now present (it was added); returns false if it is not (it was removed).

Internet Explorer 10

Syntax

var retVal = DOMTokenList.toggle(token);

Parameters

token [in]

Type: DOMString

retVal [out, retval]

Type: boolean

Remarks

Throws a SyntaxError exception if token is empty. Throws an InvalidCharacterError exception if token contains any spaces.

See also

DOMTokenList

 

 

Send comments about this topic to Microsoft

Build date: 11/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.