I’m trying to use jQuery to access an iframe with no id or class attribute inside a div.
This is currently what the source looks like.
<div id="cont">
<iframe src="#" style="border: none; width: 500px; height: 196px; overflow: hidden"
frameborder="0"></iframe>
</div>
I would like to change the width and height of the iframe and I think I need to do something like this, setAttribute("height", "2000");. I just don’t know how to find that iframe because it doesn’t have an id or class on it.
Given that you know the iframe’s parent’s ID, it should be trivial to select:
Then you can set its height: