Created
March 5, 2010 20:54
-
-
Save scottjehl/323136 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//EnhanceJS (enhancejs.googlecode.com) | |
//Quick idea for loading CSS depending on Screen resolution with EnhanceJS. | |
//Smart phones that pass capabilities tests would get mobile.css | |
//enhance page based on capabilities and serve different CSS based on screen resolution | |
enhance({ | |
loadStyles: screen.availWidth < 500 ? ['css/mobile.css'] : ['css/screen.css'] | |
}); | |
/* | |
result: | |
- newer desktop browsers get screen.css | |
- iPhone gets mobile.css. | |
- older browsers, bag phones get basic.css | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment