I am trying to get Enquire.js to work for legacy browsers. I use the Deep support method from the docs:
Modernizr.load([ { test: window.matchMedia, nope: "media.match.min.js" }, "enquire-2.0.0.min.js", "plugins.js", // jquery plugins "main.js" // enquire-triggered functions + general code ]);
The problem with this is that I am using Modernizr + Reply from initializr.com, so the test always passes. This causes a JS error in enquire.js in IE8 / 9.
By removing response.js and just using simple Modernizr, the test failed, Media.match loads and the JS error is resolved. However, I am losing support for Media Query in IE8.
What is the best way to make everything work together? I tried loading response.js simultaneously with Media.match via Modernizr. If I download it first, I see the same JS error as before. If I download the second, media queries do not work. I also tried just loading this INSTEAD from Media.match, but the JS error is returning.
Thanks.
EDIT:
Shortly after posting this post, I rolled back to request 1.5.6, use Respond.js, the shouldDegrade option, and Modernizr tests. There are no JS errors in IE8 / 9, and everything seems to be working fine so far.
I'm still curious to know if there is a way to get this to work with 2.0, or if I should stick with 1.5.6 at the moment?
source share