javascript - Having jQuery inside of an iframe modify the parent window -
i have page has iframe.
in iframe, want jquery remove element patent page, i'm trying:
parent.$('#attachment-134').remove();
but doesn't work. ideas? thanks
should be:
$(parent.document).find('#attachment-134').remove();
this of course remains true, if iframe , parent have identical domain. otherwise sop (same origin policy) deny access.
example: http://jsbin.com/eqise5
Comments
Post a Comment