matchMedium method

Gets a value that indicates whether the specified media is supported by the object that displays the document object. This allows you to query the media or device, such as a mobile device, and customize the presentation from JavaScript.

Syntax

var retval = StyleMedia.matchMedium(mediaQuery);

Parameters

mediaQuery [in]

Type: String

The media query to match.

Return value

Type: Boolean

A Boolean value that indicates whether the media type of the object matches the media type that the mediaQuery parameter specifies.

Standards information

There are no standards that apply here.

See also

StyleMedia
CSS3 Media Queries Module
CSS3 Media Queries (IE Team Blog post)
Respond to Different Devices With CSS3 Media Queries (Script Junkie)

 

 

Show:
© 2014 Microsoft