I know I can get the index of the currently selected tab but can I somehow get to the ID (the equivalent of the ui.panel.id if this were triggered by an tab eve
ui.panel.id
If you want the id (or actually the href) from the selected tab, you can use eq() to retrieve the jQuery Object.
id
href
eq()
You can see an example here: http://jsfiddle.net/svierkant/hpU3T/1/