Working with the QueryCollection Class

Both the WinJS.Utilities.query() method and the WinJS.Utilities.id() method return an instance of the QueryCollection class. The QueryCollection class derives from the base JavaScript Array class and adds several useful methods for working with HTML elements:

Image addClass(name)—Adds a class to every element in the QueryCollection

Image clearStyle(name)—Removes a style from every element in the QueryCollection

Image control(ctr, ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.