activate accordian with a variable

activate accordian with a variable

Hi folks! Hope you can give me some pointers here:

I have my accordion running smoothly, but what I want to do is activate a section of the accordian via a url parameter. Using the variable name does not work eg

...
//simpliied, get the parameter from querystring using getUrlParam
var docID = $(document).getUrlParam("docID");
...

// then want to use it here
$('#matrix').accordion("activate", docID)


//instead of
$('#matrix').accordion("activate", 2)