Skip to content

Instantly share code, notes, and snippets.

@dmolsen
Created January 6, 2012 14:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmolsen/1570854 to your computer and use it in GitHub Desktop.
Save dmolsen/1570854 to your computer and use it in GitHub Desktop.
MQSugr Demo Page Code Just Using Default Modernizr.load
// 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