jQuery UI Tabs – How to Get Currently Selected Tab Index

If you need to get the tab index from outside the context of a tabs event, use this:

function getSelectedTabIndex() { 
    return $("#TabList").tabs('option', 'selected');
}

Update:
From version 1.9 ‘selected’ is changed to ‘active’

$("#TabList").tabs('option', 'active')

Leave a Comment