Skip to content

Instantly share code, notes, and snippets.

@andymantell
Created September 25, 2014 12:00
Show Gist options
  • Save andymantell/696614303124500b342e to your computer and use it in GitHub Desktop.
Save andymantell/696614303124500b342e to your computer and use it in GitHub Desktop.
conduct.js basic usage
conduct(
{
'media_queries':
[
{
query: 'max-width: 600px',
match: function() {
// This code will run when this media query moves from an unmatched state to a matched state
},
unmatch: function() {
// This code will run when this media query moves from a matched state to an unmatched state
}
},
{
query: 'min-width: 601px',
match: function() {
// This code will run when this media query moves from an unmatched state to a matched state
},
unmatch: function() {
// This code will run when this media query moves from a matched state to an unmatched state
}
},
],
'timeout': 300 // optional - default provided
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment