GithubHelp home page GithubHelp logo

Comments (6)

pzula avatar pzula commented on May 18, 2024

I haven't yet figured this out, but in the mean time, I used PHP to conditionally load enquire and matchmedia only for browsers other than IE 8 and below.

from enquire.js.

bzaman avatar bzaman commented on May 18, 2024

As I know IE7-8 does not have matchmedia, but, may be polyfill sometimes work regarding this...

from enquire.js.

pzula avatar pzula commented on May 18, 2024

I do have the match media polyfill, is what I mean by using all three together

from enquire.js.

WickyNilliams avatar WickyNilliams commented on May 18, 2024

I'm afraid I don't know what the issue might be. Looking at respond.js, nothing seems out of order (though I notice it actually includes it's own version of matchMedia, so you don't necessarily have to include your own!). Is anything logged to the console?

from enquire.js.

pzula avatar pzula commented on May 18, 2024

@WickyNilliams, so if respond.js has matchMedia, I don't need to add the other matchMedia library? I thought respond.js' matchMedia was for CSS, and the other matchMedia library was for older Andriods' js?

from enquire.js.

WickyNilliams avatar WickyNilliams commented on May 18, 2024

You shouldn't have to, no.

But I think you've gotten confused about matchMedia. It's a native API for testing media queries in JavaScript. Respond.js contains a matchMedia polyfill. That polyfill approximates the behaviour of the API only. It does not give the browser the ability to evaluate CSS3 media queries, only the ability to evaluate media queries it understands eg. In IE8 you could do something like matchMedia("screen").matches and that would evaluate to true. But anything more complex would always be false.

Respond.js approximates a subset of css3 media queries by analysing your CSS.

Hope that makes sense

from enquire.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.