Export (0) Print
Expand All
go
Expand Minimize

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

 

 

Show:
© 2015 Microsoft