matchMedium
Summary
Indicates whether the document currently matches a media query.
Method of css/media_queries/apis/StyleMediacss/media_queries/apis/StyleMedia
Syntax
var matchesMedia = window.styleMedia.matchMedium(/* see parameter list */);
Parameters
mediaQuery
- Data-type
- String
The media query to match.
Return Value
Returns an object of type BooleanBoolean
Boolean
Returns whether the media type of the document matches the media type that the mediaQuery parameter specifies.
Notes
The mediaQuery parameter can contain a string that specifies a media type, an optional well-formed Cascading Style Sheets (CSS) media query, or both. For more information on Media Queries, see Media Queries.
See also
Related articles
CSSOM
matchMedium
Media Queries
matchMedium
Related pages
- StyleMediaStyleMedia
<b/>
- CSS3 Media Queries ModuleCSS3 Media Queries Module
- Internet Explorer Test Drive: CSS3 Media QueriesInternet Explorer Test Drive: CSS3 Media Queries
- CSS3 Media Queries (IE Team Blog post)CSS3 Media Queries (IE Team Blog post)
- Respond to Different Devices With CSS3 Media Queries (Script Junkie)Respond to Different Devices With CSS3 Media Queries (Script Junkie)
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]