Created
September 5, 2012 17:23
-
-
Save jordanstephens/3640465 to your computer and use it in GitHub Desktop.
swap stylesheet medias between screen and print
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
jQuery('link[rel=stylesheet]').each(function() { | |
var $t = jQuery(this), p = 'print', s = 'screen', m = 'media'; | |
if ($t.attr(m) === p) { $t.attr(m, s); } else if ($t.attr(m) === s) { $t.attr(m, p); } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment