Cross browser query plug-in for jQuery. Add classes to the dom based on media queries.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
source
README.md
mediaQuery.jquery.json
mediaQuery.min.js

README.md

mediaQuery

Plug-in for jQuery that adds a class to each selected element equal to the key of any matching media query. Also acts as a polyfill for media queries, matchMedia and addEventListener javascript functions.

Usage:

$(document).ready(function(){
	
	$('body').mediaQuery({
		w320: 'only screen and (min-width: 320px)',
		w480: 'only screen and (min-width: 480px) ',
		w768: 'only screen and (min-width: 768px)',
		w1024: 'only screen and (min-width: 1024px)'
	});
})

Example:

http://jameswestgate.github.com/mediaQuery/examples/