[jQuery] ui.tabs - selecting an element within the clicked tab

[jQuery] ui.tabs - selecting an element within the clicked tab


When a tab is clicked, I need to call a function to do something to
div.myDiv within the now active tab content
My markup is something like this:
        <ul class="tabs-nav">
            <li><a href="#tab1">This Calc</a></li>
            <li><a href="#tab2">That Calc</a></li>
        </ul>
        <div id="tab1" class="tabs-container">
            <div class="myDiv">somecontent</div>
        </div>
        <div id="tab2" class="tabs-container">
            <div class="myDiv">somecontent</div>
        </div>
and my ui.tabs call is currently (incorrectly and incompletely) like
this:
    $('#topPane > ul.tabs-nav').tabs({ show: function() { $
(this).find('div.myDiv').doSomething(); } });
I guess I need to understand two things: should I be using 'show' or
'enable'? And in this case, what is 'this' - is it the anchor or it's
associated tab container?
Thanks!
rolfsf