Morning all. I have the folowing problem:
$(document).ready(function(){
$("#actContentToGet").load(function(){
var htmlCODE = document.getElementById('actContentToGet').contentWindow.document.body;
var elements = [];
var z = 1;
function alterContent(htmlCODE){
$("#createdDivs").html("");
htmlCODE.$("*").each(function(){
alert("w");
if($(this).attr("rel")!="nbta"){
var style = '#div' + z + ' style: ' + 'display:block; width:' + $(this).outerWidth( true ) + 'px; height:' + $(this).outerHeight( true ) + 'px; position:absolute; top:' + $(this).position().top + 'px; left:' + $(this).position().left + 'px; cursor:pointer; z-index:' + $(this).parentNumber() + ';';
var newDiv = '<div name="maskBox" id="div' + z + '" class="' + $(this).attr("id") + '" style="display:none;"> </div>';
$("#createdDivs").append(newDiv);
$("#div" + z).attr("style", style);
z++;
}
});
}
});
});
im not sure how to go about this but i want to be able to use $("*").each()
using the content from the iframe if you understand what i mean?
i used htmlCODE.$("*").each(function(){
htmlCODE is undefined
any help much appreciated