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
The site I'm working on now needs JS to run if the user resizes past certain breakpoints, and so have a couple other sites I've worked on. Should we add something like this to the onResize function?
// Breakpoint change callbacksswitch(true){// increasing widthcaseold.width<750&&site.winWidth>=750:
console.log('mobile to laptop');break;caseold.width<1200&&site.winWidth>=1200:
console.log('laptop to desktop');break;caseold.width<1800&&site.winWidth>=1800:
console.log('desktop to cinema');break;// decreasing widthcaseold.width>=1800&&site.winWidth<1800:
console.log('cinema to desktop');break;caseold.width>=1200&&site.winWidth<1200:
console.log('desktop to laptop');break;caseold.width>=750&&site.winWidth<750:
console.log('laptop to mobile');break;};
The text was updated successfully, but these errors were encountered:
No, I think this is a dangerous road to go down. Making a lot more work for us. The fact we haven’t needed this up till now gives me pause. Lets discuss.
On Mar 31, 2017, at 10:42 AM, SaFrMo ***@***.***> wrote:
The site I'm working on now needs JS to run if the user resizes past certain breakpoints, and so have a couple other sites I've worked on. Should we add something like this to the onResize function?
// Breakpoint change callbacks
switch(true){
// increasing width
case old.width < 750 && site.winWidth >= 750:
console.log('mobile to laptop');
break;
case old.width < 1200 && site.winWidth >= 1200:
console.log('laptop to desktop');
break;
case old.width < 1800 && site.winWidth >= 1800:
console.log('desktop to cinema');
break;
// decreasing width
case old.width >= 1800 && site.winWidth < 1800:
console.log('cinema to desktop');
break;
case old.width >= 1200 && site.winWidth < 1200:
console.log('desktop to laptop');
break;
case old.width >= 750 && site.winWidth < 750:
console.log('laptop to mobile');
break;
};
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#17>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAc_h0M_Cp2-Sic2KYzBbfhNlgy-QROfks5rrTr-gaJpZM4Mv9L4>.
The site I'm working on now needs JS to run if the user resizes past certain breakpoints, and so have a couple other sites I've worked on. Should we add something like this to the
onResize
function?The text was updated successfully, but these errors were encountered: