KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to append an html element to a div and have jquery return me the wrapped set that contains the element I just appended and not the wrapped set containing the div So my html:- ... <div id="somediv">Some other elements...</div> ... javascript:- var jqueryObj = $('#somediv').append('<p>Hello, World!</p>'); alert(jqueryObj.html()); I'd like this to alert me with 'Hello, world' not 'Some other elements...<p>Hello, World!</p>'
Tags (comma-separated)
Save Edits
Cancel