When I attach functionality to an element do I need to call .widgetName('destroy') before removing it from the DOM or does jQuery handle this?
When I attach functionality to an element do I need to call .widgetName(‘destroy’) before
Share
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.
Try using
remove.I don’t think this happens automatically, but then again, I don’t think you need to call the
destroymethod as theevent handlersare destroyed for you from the remove call.