如何在 jQuery UI 1.9 中获取选项卡选择的 ID?
我在 jQuery UI 1.8 中使用了这个方法:
var key = $('#chart-report-tabs .ui-tabs-panel:not(.ui-tabs-hide)').prop('id');
但它在 1.9 版本中不起作用。
如何在 jQuery UI 1.9 中获取选项卡选择的 ID?
我在 jQuery UI 1.8 中使用了这个方法:
var key = $('#chart-report-tabs .ui-tabs-panel:not(.ui-tabs-hide)').prop('id');
但它在 1.9 版本中不起作用。
尝试这个:
$('#chart-report-tabs .ui-tabs-panel[aria-hidden="false"]').prop('id');
    试试这个:
$("#<id of tabs>").tabs("option","active")
返回活动选项卡的从零开始的索引
尝试这个:
var $tabs = $('#chart-report-tabs');
var index = $tabs.tabs('option', 'selected');
var key = $tabs.tabs("option", "panel").find('.ui-tabs-panel').eq(index).prop('id');
    使用activateorbeforeActivate事件ui.newPanel:
$('#chart-report-tabs').tabs({
  activate: function(e, ui) {
    var key = $(ui.newPanel).prop('id');
  }
});
$('#divName .ui-tabs-panel[aria-hidden="false"]').prop('id');