I have an iframe in my main webpage to which I send different html pages. I would like to create an event, during which a click within the iframe (within the second webpage) triggers an event on the main webpage (within which the iframe sits).
Therefore my question: Is it possible to use a selector in jQuery that refers to an id in a different webpage? I tried using
$("second_webpage.html#div1").click(function() {
$("#image").css("display", "");
});
but no success.
Is referring to an element in an external page even possible in jQuery? Are there other ways of doing this?
Thanks in advance!