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

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -