toggleClass method

QueryCollection.toggleClass method

Applies to Windows and Windows Phone

Toggles (adds or removes) the specified class on all the elements in the collection. If the class is present, it is removed; if it is absent, it is added.

Syntax


var queryCollection = queryCollection.toggleClass(name);

Parameters

name

Type: string

The name of the class to be toggled.

Return value

Type: QueryCollection

This QueryCollection object.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Utilities

See also

QueryCollection

 

 

Show:
© 2016 Microsoft