Skip to content

Instantly share code, notes, and snippets.

@michaelbragg
Last active December 14, 2015 09:09
Show Gist options
  • Save michaelbragg/5063310 to your computer and use it in GitHub Desktop.
Save michaelbragg/5063310 to your computer and use it in GitHub Desktop.
Demo of Media Query Dependant Javascript using YepNope
<script>
Modernizr.load([
{
test: Modernizr.mq("only screen and (max-width: 320px)"),
yep: 'mobile.js'
},
{
test: Modernizr.mq("only screen and (min-width: 321px)"),
yep: 'desktop.js'
}
]);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment