I am loading an external page into an HTML object:
var object = document.createElement('object')
object.data = 'myPage.html'
$("#myDiv").html(object)
Now I want to modify the source of object
. But I can't figure out how to use jQuery to access any of the elements of myPage.html
. For example:
$("#myPageDiv").css('background-color', '#000');
has no effect. How can I modify the elements within the injected HTML object?