You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if Response.crossover will be the new event function, how does one run breakpoint-specific JS code if Response.crossover only works when a breakpoint is crossed into?
For example, I'd create the breakpoint set like so:
Then I'd have a Response.crossover() to listen for width changes, like so...
Response.crossover('width',function(){// Small/medium code here (anything under 960px)if(R.band(Breakpoints.LARGE)){// Large+ code here (anything 960px and wider)}}
But then how do I properly fire some code that should happen in my Breakpoints.LARGE custom breakpoint on pageload? Just run it outside of crossover(), like this?
Response.crossover('width',function(){// Small/medium code here (anything under 960px)}if(R.band(Breakpoints.LARGE)){// Large+ code here (anything 960px and wider)}
Activity
Comment about deprecations per #51
jerseycheese commentedon Mar 2, 2015
I'm slightly confused.
So if Response.crossover will be the new event function, how does one run breakpoint-specific JS code if Response.crossover only works when a breakpoint is crossed into?
For example, I'd create the breakpoint set like so:
Then I'd have a Response.crossover() to listen for width changes, like so...
But then how do I properly fire some code that should happen in my Breakpoints.LARGE custom breakpoint on pageload? Just run it outside of crossover(), like this?