[jQuery] jQuery UI Tabset with ajax reloads tab content

[jQuery] jQuery UI Tabset with ajax reloads tab content


Im using a jQuery UI tabset, with each tab contents loaded dynamically
    <div id="example">
        <ul class="ui-tabs-nav">
                <li class="ui-tabs-selected"><a
href="accounts.php"><span>Accounts</span></a></li>
                <li><a href="transactions.php"><span>Transactions</span></a></li>
        </ul>
    </div>
This works ok, but the tab content is loaded each time the tab is
clicked.
I think Id like the tab to be loaded if its not already in the DOM,
but after that I want it to just flick back to the already loaded
tab.
Is there a way to do this generically which doesnt involve handling
each tab on an id by id basis?
Thanks