I found code to provide enable canceling of switching tabs, but I need to run code specific to the ID of the currently selected tab. How do I get the currently selected tab, not the tab clicked on? I tried the beforeActivate ui.oldTab but that returned "undefined".
alert('current: ' + $(ui.oldTab).attr('id'));
Here is what I found so far:
cancel tab switch: http://jsfiddle.net/nuywj/
get id of tab being selected: http://jsfiddle.net/WnDV9/2/