how do i check which tabs is active using jquery tabs?
Try this instead: var ref_this = $("ul. tabs li a. active");
Please try with Index
function getIndex(){
return $("ul li.ui-state-active").index();
}
It will returns the index of selected li or tab.
I needed to get the active tab during the activate event. I was able to do this using the option active call.
$('#tabs').tabs({
activate: function (event, ui) {
var activeTabId = $(this).tabs('option', 'active');
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With