Frage

I have a line of code in a page being loaded in an iframe that accesses an element in its parent window:

$('#titleBack', window.parent.document).fadeIn(500);

Both pages are in the same domain. This works fine in Chrome and Firefox but crashes* in Safari. From what info I can gather from people testing my site, this was working fine in Safari as of a few days ago. Any ideas?

*No code beyond this line gets processed, however all the code up until this line is processed properly.

War es hilfreich?

Lösung

Using top.document instead of window.parent.document fixes the problem.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top