KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a UI using dynamic tabs, so content can be loaded into a tab and then the tab can be closed and the content removed from the page. When I load content into a tab I attach a lot of events to elements using jQuery. What happens when I remove these elements from the page? Does jQuery need to know? Also, does it matter if I attach an event multiple times? For example, in my tab load I might attach an event using a class selector like $('.submitButton').click(...) . But I might already have other tabs open, which have already had the submitButton event attached. In this case, I'll be re-attaching the same event. Is there any problem with this?
Tags (comma-separated)
Save Edits
Cancel