Saturday, July 25, 2009

[jQuery] accessing iframe content

hi there, i just started working with iframes and i'm stucked :D

so...i have this code inside a html file:

<iframe id="myframe">
<p>text</p>
</iframe>

what i'm trying to do is to grab that paragraph text(using jquery).

by now i tried something like this:

$("#myframe").contents().find("p").html();

but....with no result :(

does anyone know the answer?

No comments: