I am using jQuery UI Tabs inside of the jQuery UI dialog window.
I\'ve come across an instance, where I need to find the id of the current tab when clicking on one o
This also works, using JQuery 3.1.1 and Jquery UI 1.12.1, when you need to select your active tab in javascript (by "select" I mean in a JQuery selector, not "select" in the sense of making the tab active, since of course the tab is already active).
To get a reference to the currently selected tab, first get a reference to the active link (substitute the id of your tabs container "myTabs"):
var $link = $('div[id=myTabs] ul .ui-tabs-active');
$link has the id the tab in the attribute "aria-controls":
var $tab = $('#' + $link.attr('aria-controls'));
$tab is a reference to the tab body. For example, you could call
$tab.html('[html here]')
to fill or replace the tab content.