Checking Media Queries With Javascript
With the web being used on so many different devices now it’s very important that you can change your design to fit on different screen sizes. The best way of changing your display depending on screen size is to use media queries to find out the size viewport of the screen and allowing you to change the design depending on what screen size is on.
read the whole article at Checking Media Queries With Javascript.
personally, i think this is possibly an excellent way to inject only the needed javascript libraries according to their usefulness. If a particular feature ability isnt used in a certain context, say a Revolution Slider in desktop which isn’t used in tablet or mobile… don’t load that library unless you have to!
Reply
You must be logged in to post a comment.