I am trying to access the elements of the document in the iframe from the parent document using the following code, but cannot get it to work for some reason.
Parent.htm
Try using load instead of ready.
$('#iframe1').load(function(){ console.log($('#iframe1').contents().find("#testDiv").html()); });