Accordion from JSquery 1.8

Accordion from JSquery 1.8

Hi:
I can obtain the active panel using:
"var myactive = $('#accordion').accordion('option', 'active');"
If i wish to obtain the active panel H3 text assigned to that panel
how do i do it. I've tried:
var mytitle = document.getElementById('accordion');
var paneltitle = mytitle[myactive].textContent;
I obviously have the nodes wrong. I can see that the H3 has a span
followed by a href but there must be a way of addressing the text
value assigned to the H# panel header.
TIA
--