I am attempting to build a form where sections of it are divs dynamically loaded via AJAX when needed. That is, when the page is loaded, the first div is loaded and displayed, and when next is clicked the first div is hidden and the next div is loaded and displayed. Within these divs are elements that I want to bind to some custom events when they are visible and unbind them when they are not. Since the elements are not in the DOM during the initial page load, I am using .live() to bind them and .die() to unbind them.
There is also a back button which I want to hide the current div, unbind any responders in it, show the previous div and rebind the responders in that div. The problem is that .die() seems to be a one shot deal and it seems like I can't rebind my events to the desired elements. Can someone please advise me on what should work here?