css - Change screen size using JavaScript -


using zurb foundation's mobile-first experience, have developed responsive design. now, client requires explicit link "view desktop version" in footer, when site opened in mobile or tablets.

there seems 2 options:

  • drop foundation , create new css files (perhaps extract selected rules foundation core css grid); 1 desktop , 1 mobile. load css file based on cookies value or url query. (long method)

  • modify screen size (max-width, min-width ..) using javascript, media query wrong info , loads right results? (imagination)

is second option possible? there (easy) way it?

yes, can modify meta tag. did project while , i've got piece of script/plugin on github: https://github.com/trolleymusic/minwidth - i've updated demos you.

you must include modernizr or won't work

you run this:

minwidth(x); 

where x min width want be.

on phone check out difference between 2 demo files:

http://waynedurack.com/minwidth/demos/with.html

vs

http://waynedurack.com/minwidth/demos/without.html


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -