jquery load stylesheet into frame

For when I forget next time:

<iframe name="framename" id="framename" src="something.html"></iframe>
$('body',framename.document)
.append('<link rel="stylesheet" href="http://mysite.com/stylesheet.css" />');

or use this awesome jquery plugin:

http://ideamill.synaptrixgroup.com/?p=6

it allows you to easily run code and load css/javascript into iframes

Leave a Reply

Your email address will not be published.