Created
June 8, 2011 16:53
-
-
Save demogar/1014817 to your computer and use it in GitHub Desktop.
responsive design con adapt.js
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
| <script> | |
| // Responsive design with adapt.js | |
| function resize_callback(i, width) { | |
| if (i > -1) { | |
| if (i == 0) | |
| $("body").removeClass().addClass("mobile"); | |
| else if (i == 1) | |
| $("body").removeClass().addClass("tablet"); | |
| else if (i == 2 || i == 3) | |
| $("body").removeClass().addClass("regular"); | |
| } | |
| } | |
| var ADAPT_CONFIG = { | |
| path: 'css/', | |
| callback: resize_callback, | |
| dynamic: true, | |
| range: [ | |
| '0px to 760px = mobile.css', | |
| '760px to 980px = 720.css', | |
| '980px to 1920px = 960.css', | |
| '1920px = 960.css' | |
| ] | |
| }; | |
| </script> | |
| <script src="js/adapt.min.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment