I have the following JavaScript function to select a tab by its index:
function changeTab(tabIndex) {
$("#panel").tabs("select", tabIndex);
}
But I have to check if that tab exists and if it's visible, or else it would try to select a tab that shouldn't be available.
For the existence it's fine, I just have to use $("#panel").tabs("length");
, but to check if it is visible I would need the element itself.