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 supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Utilities

Library

Base.js

See also

QueryCollection

 

 

Show:
© 2014 Microsoft