$(document).ready(function () {
$('#keywordframe').contents().find("#step12").html('');
$('#keywordframe').contents().find("#step12").html('11');
$('#keywordframe').contents().find("#step13").html('');
$('#keywordframe').contents().find("#step13").html('12');
$('#keywordframe').contents().find("#step14").html('');
$('#keywordframe').contents().find("#step14").html('13');
$('#keywordframe').contents().find("#step15").html('');
$('#keywordframe').contents().find("#step15").html('14');
});
I try to use the above code to change the content in an iframe, but it is not working. Unless I put alert(''); on top of $('#keywordframe').contents().find("#step12").html('');
if just will take effect. What is the reason for that, anyone could help?
It could just be that you need to wait for the iframe to load.
Since this is the only thing I can think of at this time, try this:
Whether it will fix your problem or not I don’t know, but it’s worth a try.