What's the "well threaded path" for handling JavaScript events in dynamically loaded (ajax) pages.
I have an app which has a tab bar controller that pulls in the sub-views through ajax, and these views have their own js, which is fine the first time round, but if someone were to use the app for a long time and cycle through all the tab views repeatedly, the events would keep getting bound over and over again which seems horribly inefficient, especially considering that these sub-views might have their own sub-views which they manage, some of which could have lots of event handlers.
What are some of more elegant approaches to solving this? (BTW, I'm using jQuery)