I need to be able to do stuff to the selected tab and the tab before it. I can get the index of the selected tab like so:
var selectedIndex = $tabs.tabs('option', 'selected');
So I’d like to do something like
$leftTab = $tabs.getTabByIndex(selectedIndex - 1);
Is there something approximating this? Or is there another way of doing this?
Assuming
$tabsis the container around your tabdivelements, try this: