Serve CSS Files Based On Screen Width Using Adapt.js
Adapt.js is a tiny (<1kb minified) JavaScript file that can load CSS files according to the width of the web pages.
Before the browser renders a page, it checks for the width and decides the CSS file to be used from a given array.
This can be easily accomplished with a server-side script, however, Adapt.js will work even if caching is enabled and it has support for the resize
+ orientationchange
events.
A potential drawback is the possibility of the flash of unstyled content (the same problem that occurs when using JS-powered web fonts) which can occur only for a tiny period time.
The usage of the script is very straightforward, just include it to your web pages, define the rules and that's it.
Special Downloads:
Ajaxed Add-To-Basket Scenarios With jQuery And PHP
Free Admin Template For Web Applications
jQuery Dynamic Drag’n Drop
ScheduledTweets
Advertisements:
Professional XHTML Admin Template ($15 Discount With The Code: WRD.)
Psd to Xhtml
SSLmatic – Cheap SSL Certificates (from $19.99/year)