I have an iframe list like that:
<iframe src="foo">
<button class="dissmiss">Close</button>
<script>
// Do job here...
</script>
</iframe>
<iframe src="bar">
<button class="dissmiss">Close</button>
<script>
// Do job here...
</script>
</iframe>
.
.
.
<iframe src="baz">
<button class="dissmiss">Close</button>
<script>
// Do job here...
</script>
</iframe>
How can I get the iframe with js or jquery? I want to remove the iframe when the button is clicked:
parentIframe.remove();
PS: They have same domain.