Created
January 6, 2012 14:35
-
-
Save dmolsen/1570854 to your computer and use it in GitHub Desktop.
MQSugr Demo Page Code Just Using Default Modernizr.load
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
// this code WON'T be run again with resize or orientationchange | |
// to start the snowflakes | |
var oncomplete = function() { snowflakes = new Snowflakes('container','snowflakesContainer'); snowflakes.create(40); }; | |
// set-up breakpoints | |
Modernizr.load([ | |
{ test: Modernizr.mq('only screen and (min-width: 320px)'), yep: 'css/320.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 600px)'), yep: 'css/600.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 600px)') && Modernizr.indexeddb, yep: 'css/600.indexeddb.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 801px)') && Modernizr.cssanimations, yep: ['css/snowflakes.css','js/snowflakes.js'], complete: oncomplete }, | |
{ test: Modernizr.mq('only screen and (min-width: 801px)'), yep: 'css/801.css' } | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment