Tabs - remove hidden div content when another tab is selected
Say I have two tabs, loaded with ajax.
I click the first tab, then the second, and then the first again. The div containing the second tab content is hidden, but the content is there. This is a problem for me, as both the selected and the hidden div have some input id's that are the same and the application does not function as it's supposed to.
What I'd like to do is clean all tab divs when a tab is selected (apart from the selected tab, of course). That way I'd only have code from the currently selected tab.