ten1seven/jRespond — pull request #13 by localpcguy (2013-07-09 06:48:43+00:00)
Title: Added test by matchMedia and fall back to using width

This was a great utility in my latest project, as I had JavaScript features that needed to turn on/off specifically when the browsers were matching a mediaQuery. I added the following code because not all browsers matched the mediaQuery width and the browser innerWidth (specifically Chrome/Safari). By testing against matchMedia first, and falling back to the width method it handles things pretty succinctly for all browsers. I don't think the matchMedia.js code is actually needed, as IE should fall back to just use width if it doesn't exist.

I merged back in the updates, so my previous additions (add a previous breakpoint) no longer is used, but I left in the additional exposed function that lets you query for what the previous breakpoint was (counter to the getBreakpoint function already exposed).