views:

130

answers:

1

I'm using jQuery UI tabs for simple tab navigation on a page, and this works great; however, I want to call a function like

function DoStuff(){  
   $("#divID").hide();
}

from within a tab. When I click on the <a href...> which calls the DoStuff() function, I see the div being hidden, but then the current tab which I am in is closed and the first tab is opened. Why is this happening and how would I fix this? Do I need to figure out which tab I am in and then select that tab after I hide the <div>?

+3  A: 

are you remembering to return false in your DoStuff() callback for the tag click? You might be reloading the page, or at least changing the hash in the url, which can have an effect on which tab you have open.

Ty W
wow. duh. thanks.
newB