Created
June 30, 2016 01:44
-
-
Save JimboFromLimbo/a99ff6cf747b1a602bca7ff7d5a84acc to your computer and use it in GitHub Desktop.
This file contains 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
var mediaQueryList = window.matchMedia('print'); | |
var mqlScreen = window.matchMedia("screen") | |
mediaQueryList.addListener(function(mql) { | |
if (mql.matches) { | |
console.log('js you want to apply before print'); | |
} | |
else if (mqlScreen.matches) { | |
console.log('js you want to apply after print'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment