Accordion: activating accordion-panel from button

Accordion: activating accordion-panel from button

I have a button that should open a certain panel from my accordion (two panels).
When the targeted accordion-panel is closed it opens and the other panel closes, so far so good.

However, when the targeted accordion-panel was already opened it closes it!! So 'activate' seems to function as a toggle. 

So I tried to collapse all and then open the panel, but it doesn't work, it keeps toggling :(

  function OpenAccordionSearch()
      { $("#accordion").accordion({activate: false, collapsible: true });

$("#accordion").accordion({active: 1, collapsible: true});
      };

Anybody any clue how to determine if an accordion-panel is already opened or not? I can't seem to find a property indicating if panel 2 is closed or open?


TIA