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

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

asp.net mvc 3 - Unexpected "foreach" keyword after "@" character -