Testcase for jQuery Ticket 2253
Workaround
by jitter
HTML
<iframe src="http://fiddle.jshell.net/jitter/Bpdve/1/show/light" width="100" height="100"></iframe>
<iframe src="http://fiddle.jshell.net/jitter/Bpdve/show/light" width="100" height="100"></iframe>
<br />
<input type="button" name="btn1" value="succeed" onclick="test1()"/> $("iframe").contents().find("div").css("color",'red');
<br />
<input type="button" name="btn2" value="error (IE6/7)" onclick="test2()"/> $("iframe").contents().find("div").html("test");
CSS
* {font-size:12px;}
</style>
JavaScript
function test1() {
$("iframe").contents().find("div").css("color", 'red');
}
function test2() {
$("iframe").each(function( i, val ) {
$(val).contents().find("body").append("<div>test</div>");
});
}