Jump to content
Search Community

matchMedia matches multiple queries

BarheimCoder test
Moderator Tag

Recommended Posts

45 minutes ago, Cassie said:

Hey there! Could you possibly explain the following a little more?

 


specifically what 'it' is in this situation? Are you referring to a timeline?

So let's say I got the following example:
 

crollTrigger.matchMedia({
  "(min-width: 768px)": function() {...},
  "(min-width: 1024px)": function() {...}
});

On an ideal situation I can just have the first query as max width, and the second with a min and max, but as I can't for what I'm trying to solve, is there a way to run it like an if chain? Meaning, it breaks once a match is found instead.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...