How to retrive value in jquery

Posted by Wondering on Stack Overflow See other posts from Stack Overflow or by Wondering
Published on 2010-04-10T06:39:03Z Indexed on 2010/04/10 6:43 UTC
Read the original article Hit count: 304

Filed under:
|

Hi All, in my js I have a var in which i have stored innerHTML. the var is having value something like

                <h2>headline<h2>
                <div>....</div>
                 ...........

Now I want to retrieve value of h2 tag..what I am doing is

           $(myvar).find("h2").text()

but its not working...what should be the exact syntax. Thanks.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript