Skip to main content
WinJS.Utilities.addClass function

Applies to Windows and Windows Phone

Adds the specified class to the specified element.

Syntax


var thmlElement = WinJS.Utilities.addClass(e, name);

Parameters

e

Type: HTMLElement

The element to which to add the class.

name

Type: string

The name of the class to add.

Return value

Type: THMLElement

The element.

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