Created
December 6, 2017 08:08
-
-
Save yayMark/94cd2f7a646515a51afd1de0e1349e4f to your computer and use it in GitHub Desktop.
jQuery: Apply styling to an element inside and iframe. Will only work if the iframe is on the same domain as the parent.
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
$("iframe.html5anim").load( function() { | |
$("iframe.html5anim").contents().find("head") | |
.append($("<style type='text/css'>#canvas{background-color:red!important;}</style>")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment