views:

5503

answers:

1

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?

+2  A: 

Try using remove . I don't think this happens automatically, but then again, I don't think you need to call the destroy method as the event handlers are destroyed for you from the remove call.

Josh