Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Tazintosh

ScrollTrigger.matchMedia(): define it's parameter using variables?

Go to solution Solved by Tazintosh,

Recommended Posts

Hi folks,

 

Following the ScrollTrigger.matchMedia() documentation, the parameter is defined like so:

{"(min-width: 800px)": function() { ... }, "(max-width: 799px)": function() { ... }}

 

My project use some global variables specific to the client. "800px" is one of them:

I would to define my parameter like so but cannot seems to make it work:

{"(min-width: " + GLOBAL.theme.width.mediumLarge + ")": function() { ... }}

 

Any way to write such a thing?

Thanks in advance for your support.

Regards.

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.
×