This doesn’t work:
This does:
Does the html() method destroy event handler information ? I need to return the object HTML to another function, that’s why I need first version (i.e. no place to append – only concatenate – at build time).
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, any event handlers are lost when converting the html to a string since they aren’t part of of the DOM or HTML code.
The solution is not converting the elements to a string – usually there’s a better way to do it, usually one not involving
document.write()