Test if tab is active

Test if tab is active

I am trying to test when a tab is active.  I am not sure if you can do this or not, but I have tried to use .active() as it seemed like it was the only method that might do the trick.  However, it does not appear to work the way I had envisioned:

  1. if ($('#tabs-4').active('option','active')) 
I thought this would evaluate to true, however instead it throws an error. Any insight would be appreciated.